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