Class: Dupe::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/dupe/configuration.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

#configObject (readonly)

Returns the value of attribute config.



3
4
5
# File 'lib/dupe/configuration.rb', line 3

def config
  @config
end