deep_transform_keys

deep_transform_keys(&block) Instance Public methods Returns a new hash with all keys converted by the block operation. This includes the keys from the root hash and from all nested hashes and arrays. hash = { person: { name: 'Rob', age: '28' } } hash.deep_transform_keys{ |key| key.to_s.upcase } # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}}

except!

except!(*keys) Instance Public methods Replaces the hash without the given keys.

jisx0301

Date.jisx0301(string='-4712-01-01'[, start=ITALY]) â date Class Public methods Creates a new Date object by parsing from a string according to some typical JIS X 0301 formats. Date.jisx0301('H13.02.03') #=> #<Date: 2001-02-03 ...>

pos=

pos=(where) Instance Public methods

slice

slice(*keys) Instance Public methods Slice a hash to include only the given keys. This is useful for limiting an options hash to valid keys before passing to a method: def search(criteria = {}) criteria.assert_valid_keys(:mass, :velocity, :time) end search(options.slice(:mass, :velocity, :time)) If you have an array of keys you want to limit to, you should splat them: valid_keys = [:mass, :velocity, :time] search(options.slice(*valid_keys))

printf

printf(format, *opts) Instance Public methods Extends IO#printf to format the given opts for Kernel#sprintf using parse_printf_format

prefix

prefix() Instance Public methods BSTR prefix the prefix for the namespace applying to the node

configure

configure(slot, value=None) Instance Public methods

getopts 2

getopts(*args) Instance Public methods Wrapper method for getopts.rb. params = ARGV.getopts("ab:", "foo", "bar:") # params[:a] = true # -a # params[:b] = "1" # -b1 # params[:foo] = "1" # --foo # params[:bar] = "x" # --bar x

index

index(idx) Instance Public methods