Class: Loco::Controller

Inherits:
Object
  • Object
show all
Includes:
Observable
Defined in:
lib/motion-loco/controller.rb

Class Method Summary collapse

Methods included from Observable

#init, #initWithFrame, #initWithStyle, #initialize, #method_missing, #register_observer, #remove_all_observers, #remove_observer, #set_properties

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Loco::Observable

Class Method Details

.instanceObject



8
9
10
# File 'lib/motion-loco/controller.rb', line 8

def self.instance
  @instance ||= new
end

.method_missing(method, *args, &block) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/motion-loco/controller.rb', line 12

def self.method_missing(method, *args, &block)
  if self.instance.respond_to? method
    self.instance.send(method, *args)
  else
    super
  end
end