class SmartAttr::ConfigHash
Attributes
config_values_map[R]
Public Class Methods
new(*args)
click to toggle source
# File lib/smart_attr/config_hash.rb, line 6 def initialize(*args) @config_hash = args.extract_options! @config_values_map = {} @config_hash.each do |_key, _config| @config_values_map[_config[:value]] = _config.merge(key: _key) end end
Public Instance Methods
[](key)
click to toggle source
# File lib/smart_attr/config_hash.rb, line 24 def [](key) @config_hash[key] end
item(value)
click to toggle source
# File lib/smart_attr/config_hash.rb, line 16 def item(value) @config_values_map[value] end
keys()
click to toggle source
# File lib/smart_attr/config_hash.rb, line 20 def keys @config_hash.keys end