Class: Odania::Config::Layout
- Defined in:
- lib/odania/config/layout.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Attributes inherited from PageBase
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize ⇒ Layout
constructor
A new instance of Layout.
- #load(data, group_name) ⇒ Object
- #reset ⇒ Object
Methods inherited from PageBase
Constructor Details
#initialize ⇒ Layout
Returns a new instance of Layout.
6 7 8 |
# File 'lib/odania/config/layout.rb', line 6 def initialize reset end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
4 5 6 |
# File 'lib/odania/config/layout.rb', line 4 def config @config end |
Instance Method Details
#dump ⇒ Object
10 11 12 13 14 |
# File 'lib/odania/config/layout.rb', line 10 def dump result = super result['config'] = config unless config.nil? result end |
#load(data, group_name) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/odania/config/layout.rb', line 16 def load(data, group_name) reset super(data, group_name) unless data['config'].nil? self.config = data['config'] end end |
#reset ⇒ Object
24 25 26 27 |
# File 'lib/odania/config/layout.rb', line 24 def reset super self.config = {} end |