members

struct.members â array Instance Public methods Returns an array of symbols representing the names of the instance variables. Customer = Struct.new(:name, :address, :zip) joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) joe.members #=> [:name, :address, :zip]

parse

parse(yaml, filename = nil) Class Public methods Parse a YAML string in yaml. Returns the first object of a YAML AST. filename is used in the exception message if a Psych::SyntaxError is raised. Raises a Psych::SyntaxError when a YAML syntax error is detected. Example: Psych.parse("---\n - a\n - b") # => #<Psych::Nodes::Sequence:0x00> begin Psych.parse("--- `", "file.txt") rescue Psych::SyntaxError => ex ex.file # => 'file.txt' ex.message # => "(file.tx

new

Lazy.new(obj, size=nil) { |yielder, *values| ... } Class Public methods Creates a new Lazy enumerator. When the enumerator is actually enumerated (e.g. by calling force), obj will be enumerated and each value passed to the given block. The block can yield values back using yielder. For example, to create a method filter_map in both lazy and non-lazy fashions: module Enumerable def filter_map(&block) map(&block).compact end end class Enumerator::Lazy def filter_m

crosshairs_cget_tkstring

crosshairs_cget_tkstring(option) Instance Public methods

code

code() Instance Public methods Returns the HTTP status code to_i

eval 2

eval(cmd = Proc.new, *args) Instance Public methods def eval(cmd = Proc.new, *args) #TkNamespace.eval(@fullname, cmd, *args) #ns_tk_call(cmd, *args) code_obj = code(cmd) ret = code_obj.call(*args) # uninstall_cmd(TkCore::INTERP._split_tklist(code_obj.path)[-1]) uninstall_cmd(_fromUTF8(TkCore::INTERP._split_tklist(_toUTF8(code_obj.path))[-1])) tk_tcl2ruby(ret) end

validate

validate(*args, &block) Instance Public methods Adds a validation method or block to the class. This is useful when overriding the validate instance method becomes too unwieldy and you're looking for more descriptive declaration of your validations. This can be done with a symbol pointing to a method: class Comment include ActiveModel::Validations validate :must_be_friends def must_be_friends errors.add(:base, 'Must be friends to leave a comment') unless commenter.f

readable?

File.readable?(file_name) â true or false Instance Public methods Returns true if the named file is readable by the effective user id of this process.

history_remove

history_remove() Instance Public methods

tv_sec

tv_sec() Instance Public methods Alias for: to_i