Module: Munna

Defined in:
lib/munna.rb,
lib/munna/cache.rb,
lib/munna/railtie.rb,
lib/munna/version.rb,
lib/munna/proxy/base.rb,
lib/munna/perform/base.rb,
lib/munna/proxy/execute.rb,
lib/munna/perform/object.rb,
lib/munna/extensions/helper.rb,
lib/munna/perform/active_record.rb,
lib/munna/extensions/basic_method.rb,
lib/munna/extensions/object_method.rb,
lib/munna/extensions/activerecord_method.rb

Defined Under Namespace

Modules: CacheHelper, Extensions, Perform, Performs, Proxy Classes: Cache, Railtie

Constant Summary collapse

KEY =
'Munna'
VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.cacheObject



8
9
10
# File 'lib/munna.rb', line 8

def cache
	Cache.instance
end

.get_key(fragments) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/munna.rb', line 12

def get_key(fragments)
	if [Symbol, String].include? fragments.class
		fragments.to_s
	else
		key = ''
		fragments.each do |fragment|
			key += '/' + (fragment.is_a?(Array) ? fragment.join('-') : fragment.to_s)
		end
		key[1..-1]
	end
end