Method: Effective::Attribute#parse_ordered_options

Defined in:
app/models/effective/attribute.rb

#parse_ordered_options(obj) ⇒ Object

This returns a nested ActiveSupport::OrderedOptions.new config



201
202
203
204
205
206
207
# File 'app/models/effective/attribute.rb', line 201

def parse_ordered_options(obj)
  return obj unless obj.kind_of?(Hash)

  ActiveSupport::OrderedOptions.new.tap do |config|
    obj.each { |key, value| config[key] = parse_ordered_options(value) }
  end
end