Class: ParamsKeeper::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/params_keeper/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keys, options = {}) ⇒ Config

Returns a new instance of Config.



7
8
9
10
11
12
# File 'lib/params_keeper/config.rb', line 7

def initialize(keys, options = {})
  @keys = Array(keys)
  @to = Array(options[:to])
  @for = Array(options[:for] || :hash)
  @url_options = options[:url_options] || {}
end

Instance Attribute Details

#forObject

Returns the value of attribute for.



5
6
7
# File 'lib/params_keeper/config.rb', line 5

def for
  @for
end

#keysObject

Returns the value of attribute keys.



5
6
7
# File 'lib/params_keeper/config.rb', line 5

def keys
  @keys
end

#toObject

Returns the value of attribute to.



5
6
7
# File 'lib/params_keeper/config.rb', line 5

def to
  @to
end

#url_optionsObject

Returns the value of attribute url_options.



5
6
7
# File 'lib/params_keeper/config.rb', line 5

def url_options
  @url_options
end