Module: Runivedo::RemoteObject::MethodMissing

Included in:
Statement
Defined in:
lib/runivedo/remote_object.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/runivedo/remote_object.rb', line 9

def method_missing(name, *args, &block)
  camelizedName = name.to_s.gsub(/_([a-z])/) { $1.capitalize }
  if camelizedName.start_with?('set')
    send_notification(camelizedName, *args)
  else
    call_rom(camelizedName, *args, &block)
  end
end