Module: Entitled::InstanceMethods

Defined in:
lib/entitled/entitled.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (private)



40
41
42
43
44
# File 'lib/entitled/entitled.rb', line 40

def method_missing(method, *args, &block)
  if match_data = method.to_s.match(/^entitled_(.+)$/)
    @entitled.send(match_data[1], *args, &block)
  end
end

Instance Method Details

#initializeObject



33
34
35
36
# File 'lib/entitled/entitled.rb', line 33

def initialize
  super
  @entitled = Titles.new self
end