Class: QProcessor::JSONParser

Inherits:
Object
  • Object
show all
Defined in:
lib/qprocessor/json_parser.rb

Overview

A parser class that treats the job contents as YAML.

Instance Method Summary collapse

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