Class: YAMLConfig
- Inherits:
-
Object
- Object
- YAMLConfig
- Defined in:
- lib/hb-runner/yaml_config.rb
Overview
this class DRYs up the yaml processing code for both HBQueue and HBConfig
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
Instance Method Summary collapse
- #filename ⇒ Object
-
#initialize(options = {}) ⇒ YAMLConfig
constructor
A new instance of YAMLConfig.
- #read ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ YAMLConfig
Returns a new instance of YAMLConfig.
9 10 11 12 |
# File 'lib/hb-runner/yaml_config.rb', line 9 def initialize = {} .each { |k,v| instance_variable_set "@#{k}", v } read if @file end |
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file.
7 8 9 |
# File 'lib/hb-runner/yaml_config.rb', line 7 def file @file end |
Instance Method Details
#filename ⇒ Object
14 |
# File 'lib/hb-runner/yaml_config.rb', line 14 def filename() File. file end |
#read ⇒ Object
16 |
# File 'lib/hb-runner/yaml_config.rb', line 16 def read() raise 'Override!' end |
#to_s ⇒ Object
17 |
# File 'lib/hb-runner/yaml_config.rb', line 17 def to_s() raise 'Override!' end |