Module: CacheMethod

Defined in:
lib/cache_method.rb,
lib/cache_method/epoch.rb,
lib/cache_method/config.rb,
lib/cache_method/version.rb,
lib/cache_method/cached_result.rb

Overview

See the README.rdoc for more info!

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: CachedResult, Config, Epoch

Constant Summary collapse

VERSION =
"0.1.4"

Class Method Summary collapse

Class Method Details

.configObject

:nodoc:



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

def self.config #:nodoc:
  Config.instance
end

.klass_name(obj) ⇒ Object

:nodoc:



12
13
14
# File 'lib/cache_method.rb', line 12

def self.klass_name(obj) #:nodoc:
  obj.is_a?(::Class) ? obj.to_s : obj.class.to_s
end

.method_delimiter(obj) ⇒ Object

:nodoc:



16
17
18
# File 'lib/cache_method.rb', line 16

def self.method_delimiter(obj) #:nodoc:
  obj.is_a?(::Class) ? '.' : '#'
end

.method_signature(obj, method_id) ⇒ Object

:nodoc:



20
21
22
# File 'lib/cache_method.rb', line 20

def self.method_signature(obj, method_id) #:nodoc:
  [ klass_name(obj), method_id ].join method_delimiter(obj)
end