Class: ParsableHash::Parser
- Inherits:
-
Object
- Object
- ParsableHash::Parser
- Defined in:
- lib/parsable_hash/parser.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(hash, strategy) ⇒ Parser
constructor
A new instance of Parser.
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
#call ⇒ Object
8 9 10 |
# File 'lib/parsable_hash/parser.rb', line 8 def call deep_parse(@hash, @strategy.hash) end |