Class: Firewool::Config
Instance Attribute Summary collapse
-
#filesystem_hits ⇒ Object
track how many times we read the yml.
-
#yaml_config ⇒ Object
readonly
Returns the value of attribute yaml_config.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #load_config ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
28 29 30 |
# File 'lib/firewool.rb', line 28 def initialize @filesystem_hits = 0 end |
Instance Attribute Details
#filesystem_hits ⇒ Object
track how many times we read the yml
17 18 19 |
# File 'lib/firewool.rb', line 17 def filesystem_hits @filesystem_hits end |
#yaml_config ⇒ Object (readonly)
Returns the value of attribute yaml_config.
16 17 18 |
# File 'lib/firewool.rb', line 16 def yaml_config @yaml_config end |
Instance Method Details
#load_config ⇒ Object
19 20 21 22 |
# File 'lib/firewool.rb', line 19 def load_config @filesystem_hits += 1 YAML.load_file("#{Rails.root.to_s}/config/firewool.yml") end |