on_load

on_load(name, options = {}, &block) Class Public methods

run_load_hooks

run_load_hooks(name, base = Object) Class Public methods

version

version() Class Public methods Returns the version of the currently loaded ActiveSupport as a Gem::Version

wrap

wrap(object) Class Public methods Wraps its argument in an array unless it is already an array (or array-like). Specifically: If the argument is nil an empty list is returned. Otherwise, if the argument responds to to_ary it is invoked, and its result returned. Otherwise, returns an array with the argument as its single element. Array.wrap(nil) # => [] Array.wrap([1, 2, 3]) # => [1, 2, 3] Array.wrap(0) # => [0] This method is similar in purpose to K

deep_dup

deep_dup() Instance Public methods Returns a deep copy of array. array = [1, [2, 3]] dup = array.deep_dup dup[1][2] = 4 array[1][2] # => nil dup[1][2] # => 4

extract_options!

extract_options!() Instance Public methods Extracts options from a set of arguments. Removes and returns the last element in the array if it's a hash, otherwise returns a blank hash. def options(*args) args.extract_options! end options(1, 2) # => {} options(1, 2, a: :b) # => {:a=>:b}

fifth

fifth() Instance Public methods Equal to self[4]. %w( a b c d e ).fifth # => "e"

forty_two

forty_two() Instance Public methods Equal to self[41]. Also known as accessing âthe redditâ. (1..42).to_a.forty_two # => 42

fourth

fourth() Instance Public methods Equal to self[3]. %w( a b c d e ).fourth # => "d"

from

from(position) Instance Public methods Returns the tail of the array from position. %w( a b c d ).from(0) # => ["a", "b", "c", "d"] %w( a b c d ).from(2) # => ["c", "d"] %w( a b c d ).from(10) # => [] %w().from(0) # => []