Flowdock
Ruby on Rails latest stable (v4.0.2) - 0 notes - Superclass: ActiveSupport::OrderedHash

Usually key value pairs are handled something like this:

h = {}
h[:boy] = 'John'
h[:girl] = 'Mary'
h[:boy]  # => 'John'
h[:girl] # => 'Mary'

Using OrderedOptions, the above code could be reduced to:

h = ActiveSupport::OrderedOptions.new
h.boy = 'John'
h.girl = 'Mary'
h.boy  # => 'John'
h.girl # => 'Mary'
Show files where this class is defined (1 file)
Register or log in to add new notes.