Class: Odania::Config::Page
- Inherits:
-
Object
- Object
- Odania::Config::Page
- Defined in:
- lib/odania/config/page.rb
Instance Attribute Summary collapse
-
#cacheable ⇒ Object
Returns the value of attribute cacheable.
-
#expires ⇒ Object
Returns the value of attribute expires.
-
#group_name ⇒ Object
Returns the value of attribute group_name.
-
#plugin_url ⇒ Object
Returns the value of attribute plugin_url.
Instance Method Summary collapse
Instance Attribute Details
#cacheable ⇒ Object
Returns the value of attribute cacheable.
4 5 6 |
# File 'lib/odania/config/page.rb', line 4 def cacheable @cacheable end |
#expires ⇒ Object
Returns the value of attribute expires.
4 5 6 |
# File 'lib/odania/config/page.rb', line 4 def expires @expires end |
#group_name ⇒ Object
Returns the value of attribute group_name.
4 5 6 |
# File 'lib/odania/config/page.rb', line 4 def group_name @group_name end |
#plugin_url ⇒ Object
Returns the value of attribute plugin_url.
4 5 6 |
# File 'lib/odania/config/page.rb', line 4 def plugin_url @plugin_url end |
Instance Method Details
#director ⇒ Object
23 24 25 26 |
# File 'lib/odania/config/page.rb', line 23 def director $logger.info self.inspect if self.group_name.nil? "#{Odania.varnish_sanitize(self.group_name)}_director" end |
#dump ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/odania/config/page.rb', line 6 def dump result = {} result['group_name'] = self.group_name unless self.group_name.nil? result['plugin_url'] = self.plugin_url unless self.plugin_url.nil? result['cacheable'] = self.cacheable unless self.cacheable.nil? result['expires'] = self.expires unless self.expires.nil? result end |
#load(data, group_name = nil) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/odania/config/page.rb', line 15 def load(data, group_name=nil) self.group_name = data['group_name'] unless data['group_name'].nil? self.group_name = group_name unless group_name.nil? self.plugin_url = data['plugin_url'] self.cacheable = data['cacheable'] unless data['cacheable'].nil? self.expires = data['expires'] unless data['expires'].nil? end |