Class: YepSearchable::Configuration
- Inherits:
-
Object
- Object
- YepSearchable::Configuration
- Defined in:
- lib/yep_searchable/configuration.rb
Instance Attribute Summary collapse
-
#configs ⇒ Object
Returns the value of attribute configs.
Instance Method Summary collapse
- #include_option(class_name, option_name, value) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #retrieve_option(class_name, option_name) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 |
# File 'lib/yep_searchable/configuration.rb', line 5 def initialize @@configs ||= Hash.new end |
Instance Attribute Details
#configs ⇒ Object
Returns the value of attribute configs.
3 4 5 |
# File 'lib/yep_searchable/configuration.rb', line 3 def configs @configs end |
Instance Method Details
#include_option(class_name, option_name, value) ⇒ Object
9 10 11 12 13 |
# File 'lib/yep_searchable/configuration.rb', line 9 def include_option(class_name, option_name, value) @@configs ||= Hash.new @@configs[class_name] ||= Hash.new @@configs[class_name][option_name] = value end |
#retrieve_option(class_name, option_name) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/yep_searchable/configuration.rb', line 15 def retrieve_option(class_name, option_name) @@configs ||= Hash.new if @@configs and @@configs[class_name] @@configs[class_name][option_name] else nil end end |