label

label() Instance Public methods Returns the label of this frame. Usually consists of method, class, module, etc names with decoration. Consider the following example: def foo puts caller_locations(0).first.label 1.times do puts caller_locations(0).first.label 1.times do puts caller_locations(0).first.label end end end The result of calling foo is this: label: foo label: block in foo label: block (2 levels) in foo

new

Hash.new â new_hashHash.new(obj) â new_hashHash.new {|hash, key| block } â new_hash Class Public methods Returns a new, empty hash. If this hash is subsequently accessed by a key that doesn't correspond to a hash entry, the value returned depends on the style of new used to create the hash. In the first form, the access returns nil. If obj is specified, this single object will be used for all default values. If a block is specified,

undefine_attribute_methods

undefine_attribute_methods() Instance Public methods Removes all the previously dynamically defined methods from the class. class Person include ActiveModel::AttributeMethods attr_accessor :name attribute_method_suffix '_short?' define_attribute_method :name private def attribute_short?(attr) send(attr).length < 5 end end person = Person.new person.name = 'Bob' person.name_short? # => true Person.undefine_attribute_methods person.name_short? # => No

attribute_method_prefix

attribute_method_prefix(*prefixes) Instance Public methods Declares a method available for all attributes with the given prefix. Uses method_missing and respond_to? to rewrite the method. #{prefix}#{attr}(*args, &block) to #{prefix}attribute(#{attr}, *args, &block) An instance method #{prefix}attribute must exist and accept at least the attr argument. class Person include ActiveModel::AttributeMethods attr_accessor :name attribute_method_prefix 'clear_' define_at

to_a

iseq.to_a â ary Instance Public methods Returns an Array with 14 elements representing the instruction sequence with the following data: magic A string identifying the data format. Always YARVInstructionSequence/SimpleDataFormat. major_version The major version of the instruction sequence. minor_version The minor version of the instruction sequence. format_type A number identifying the data format. Always 1. misc A hash containing: :arg_size the total number of ar

load_schema

load_schema(format = ActiveRecord::Base.schema_format, file = nil) Instance Public methods

selected

selected() Instance Public methods Alias for: value

resume

resume() Class Public methods

open

open(uri, config, first=true) Class Public methods Open a client connection to uri with the configuration config. The DRbProtocol module asks each registered protocol in turn to try to open the URI. Each protocol signals that it does not handle that URI by raising a DRbBadScheme error. If no protocol recognises the URI, then a DRbBadURI error is raised. If a protocol accepts the URI, but an error occurs in opening it, a DRbConnError is raised.

entries

entries() Instance Public methods Return the entries (files and subdirectories) in the directory, each as a Pathname object. The results contains just the names in the directory, without any trailing slashes or recursive look-up. pp Pathname.new('/usr/local').entries #=> [#<Pathname:share>, # #<Pathname:lib>, # #<Pathname:..>, # #<Pathname:include>, # #<Pathname:etc>, # #<Pathname:bin>, # #<Pathname:man>, # #<Path