Class: Euston::Websites::ApiCommandRequestParsing::BatchParser
- Inherits:
-
AbstractParser
- Object
- AbstractParser
- Euston::Websites::ApiCommandRequestParsing::BatchParser
- Defined in:
- lib/euston-websites/api_command_request_parsing/batch_parser.rb
Instance Method Summary collapse
-
#initialize(request, &block) ⇒ BatchParser
constructor
A new instance of BatchParser.
- #transform_hash_to_commands(hash) ⇒ Object
Methods inherited from AbstractParser
Constructor Details
#initialize(request, &block) ⇒ BatchParser
Returns a new instance of BatchParser.
5 6 7 8 |
# File 'lib/euston-websites/api_command_request_parsing/batch_parser.rb', line 5 def initialize request, &block super request @transformer = block end |
Instance Method Details
#transform_hash_to_commands(hash) ⇒ Object
10 11 12 |
# File 'lib/euston-websites/api_command_request_parsing/batch_parser.rb', line 10 def transform_hash_to_commands hash @transformer.call hash end |