Class: QProcessor::YAMLParser

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

Overview

A parser class that treats the job contents as YAML.

Instance Method Summary collapse

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