Class: Vantiv::Certification::CertRequestBodyCompiler

Inherits:
Object
  • Object
show all
Defined in:
lib/vantiv/certification/cert_request_body_compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*matchers) ⇒ CertRequestBodyCompiler

Returns a new instance of CertRequestBodyCompiler.



6
7
8
# File 'lib/vantiv/certification/cert_request_body_compiler.rb', line 6

def initialize(*matchers)
  @matchers = matchers
end

Instance Attribute Details

#matchersObject

Returns the value of attribute matchers.



4
5
6
# File 'lib/vantiv/certification/cert_request_body_compiler.rb', line 4

def matchers
  @matchers
end

Instance Method Details

#compile(hash) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/vantiv/certification/cert_request_body_compiler.rb', line 10

def compile(hash)
  dup = {}
  hash.each do |key, value|
    if value.is_a?(Hash)
      dup[key] = compile(value)
    else
      dup[key] = compile_value(value)
    end
  end
  dup
end