Module: Viper::SnakeCase

Defined in:
lib/viper/snake_case.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/viper/snake_case.rb', line 3

def method_missing(meth, *args)
  obj_c_meth = objective_c_method_name(meth)
  if respond_to?(obj_c_meth)
    send obj_c_meth, *args
  else
    raise NoMethodError.new(meth.to_s) 
  end
end

Instance Method Details

#respond_to?(meth, *a) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/viper/snake_case.rb', line 12

def respond_to?(meth, *a)
  super || super(objective_c_method_name(meth), *a)
end