Class: QProcessor::JSONParser
- Inherits:
-
Object
- Object
- QProcessor::JSONParser
- Defined in:
- lib/qprocessor/json_parser.rb
Overview
A parser class that treats the job contents as YAML.
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ JSONParser
constructor
A new instance of JSONParser.
- #parse(job) ⇒ Object
Constructor Details
#initialize(settings = {}) ⇒ JSONParser
Returns a new instance of JSONParser.
6 7 8 |
# File 'lib/qprocessor/json_parser.rb', line 6 def initialize(settings={}) @settings = {}.merge(settings) end |
Instance Method Details
#parse(job) ⇒ Object
10 11 12 |
# File 'lib/qprocessor/json_parser.rb', line 10 def parse(job) JSON.parse(job.body) end |