Class: RestAssured::Config::ConfigHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/rest-assured/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(default_values = {}) ⇒ ConfigHash

Returns a new instance of ConfigHash.



8
9
10
11
# File 'lib/rest-assured/config.rb', line 8

def initialize(default_values = {})
  super()
  self.merge!(default_values)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/rest-assured/config.rb', line 13

def method_missing(meth, *args)
  meth = meth.to_s

  if meth.sub!(/=/, '')
    self[meth.to_sym] = args.first
  else
    self[meth.to_sym]
  end
end