Class: ParsableHash::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/parsable_hash/parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash, strategy) ⇒ Parser

Returns a new instance of Parser.



3
4
5
6
# File 'lib/parsable_hash/parser.rb', line 3

def initialize(hash, strategy)
  @hash     = hash
  @strategy = HashStrategy.new(strategy, @hash)
end

Instance Method Details

#callObject



8
9
10
# File 'lib/parsable_hash/parser.rb', line 8

def call
  deep_parse(@hash, @strategy.hash)
end