Class: Odania::Config::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/odania/config/page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cacheableObject

Returns the value of attribute cacheable.



4
5
6
# File 'lib/odania/config/page.rb', line 4

def cacheable
  @cacheable
end

#expiresObject

Returns the value of attribute expires.



4
5
6
# File 'lib/odania/config/page.rb', line 4

def expires
  @expires
end

#group_nameObject

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_urlObject

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

#directorObject



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

#dumpObject



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