Class: Dragonfly::Cache::Mapper::Yaml
- Inherits:
-
Object
- Object
- Dragonfly::Cache::Mapper::Yaml
- Extended by:
- Forwardable
- Defined in:
- lib/dragonfly/cache/mapper/yaml.rb
Instance Attribute Summary collapse
-
#internal ⇒ Object
readonly
Returns the value of attribute internal.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize(config) ⇒ Yaml
constructor
A new instance of Yaml.
- #store(key, value) ⇒ Object (also: #[]=)
Constructor Details
#initialize(config) ⇒ Yaml
Returns a new instance of Yaml.
15 16 17 18 19 |
# File 'lib/dragonfly/cache/mapper/yaml.rb', line 15 def initialize(config) @root = config[:server_root] @internal = {} load! end |
Instance Attribute Details
#internal ⇒ Object (readonly)
Returns the value of attribute internal.
11 12 13 |
# File 'lib/dragonfly/cache/mapper/yaml.rb', line 11 def internal @internal end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
11 12 13 |
# File 'lib/dragonfly/cache/mapper/yaml.rb', line 11 def root @root end |
Instance Method Details
#store(key, value) ⇒ Object Also known as: []=
21 22 23 24 |
# File 'lib/dragonfly/cache/mapper/yaml.rb', line 21 def store(key, value) @internal[key] = value save! end |