Class: Yamload::Loading::Yaml
- Inherits:
-
Object
- Object
- Yamload::Loading::Yaml
- Defined in:
- lib/yamload/loading/yaml.rb
Instance Method Summary collapse
- #content ⇒ Object
- #exist? ⇒ Boolean
-
#initialize(file, dir) ⇒ Yaml
constructor
A new instance of Yaml.
- #reload ⇒ Object
Constructor Details
#initialize(file, dir) ⇒ Yaml
Returns a new instance of Yaml.
7 8 9 10 |
# File 'lib/yamload/loading/yaml.rb', line 7 def initialize(file, dir) @file = file @dir = dir end |
Instance Method Details
#content ⇒ Object
16 17 18 |
# File 'lib/yamload/loading/yaml.rb', line 16 def content @content ||= IceNine.deep_freeze(load) end |
#exist? ⇒ Boolean
12 13 14 |
# File 'lib/yamload/loading/yaml.rb', line 12 def exist? File.exist?(filepath) end |
#reload ⇒ Object
20 21 22 23 |
# File 'lib/yamload/loading/yaml.rb', line 20 def reload @content = @immutable_obj = nil content end |