Class: Dupe::Configuration
- Inherits:
-
Object
- Object
- Dupe::Configuration
- Defined in:
- lib/dupe/configuration.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #method_missing(method_name, *args, &block) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 |
# File 'lib/dupe/configuration.rb', line 5 def initialize @config ||= {} @config[:record_identifiers] = [:id] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
10 11 12 |
# File 'lib/dupe/configuration.rb', line 10 def method_missing(method_name, *args, &block) set_config_option(method_name.to_sym, method_name.to_s.plural? ? args : args.first) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/dupe/configuration.rb', line 3 def config @config end |