Class Object
In: lib/cachetastic/ruby_extensions/object.rb
lib/cachetastic.rb
Parent: Object

Methods

Public Class methods

Uses define_method to create an empty for the method parameter defined. That method will then raise MethodNotImplemented. This is useful for creating interfaces and you want to stub out methods that others need to implement.

[Source]

    # File lib/cachetastic.rb, line 23
23:   def self.needs_method(meth)
24:     define_method(meth) do
25:       raise NoMethodError.new("The interface you are using requires you define the following method '#{meth}'")
26:     end
27:   end

Public Instance methods

Override this method in your object if you use the Cachetastic::Cacheable module.

[Source]

   # File lib/cachetastic/ruby_extensions/object.rb, line 4
4:   def cachetastic_key
5:     raise NoMethodError.new('cachetastic_key')
6:   end

[Validate]