Class: TicketEvolution::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ticket_evolution/core/base.rb

Direct Known Subclasses

Connection, Endpoint

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/ticket_evolution/core/base.rb', line 3

def method_missing(method, *args)
  begin
    "#{self.class.name}::#{method.to_s.camelize.to_sym}".constantize.new({:parent => self})
  rescue
    begin
      "TicketEvolution::#{method.to_s.camelize.to_sym}".constantize.new({:parent => self})
    rescue
      super
    end
  end
end