Module: Elasticated::Mixins::Configurable
- Included in:
- Client, Repository, Repository::IntelligentSearch
- Defined in:
- lib/elasticated/mixins/configurable.rb
Class Method Summary collapse
Class Method Details
.delegated(attr_name) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/elasticated/mixins/configurable.rb', line 5 def self.delegated(attr_name) define_method attr_name do instance_variable_get("@#{attr_name}") || Configuration.send(attr_name) end define_method "#{attr_name}=" do |value| instance_variable_set "@#{attr_name}", value end end |