Class: AMQClickListener

Inherits:
Object
  • Object
show all
Defined in:
lib/android_motion_query/events.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(activity, method_name) ⇒ AMQClickListener

Returns a new instance of AMQClickListener.



3
4
5
6
# File 'lib/android_motion_query/events.rb', line 3

def initialize(activity, method_name)
  self.activity = activity
  self.method_name = method_name
end

Instance Attribute Details

#activityObject

Returns the value of attribute activity.



2
3
4
# File 'lib/android_motion_query/events.rb', line 2

def activity
  @activity
end

#method_nameObject

Returns the value of attribute method_name.



2
3
4
# File 'lib/android_motion_query/events.rb', line 2

def method_name
  @method_name
end

Instance Method Details

#onClick(view) ⇒ Object



8
9
10
# File 'lib/android_motion_query/events.rb', line 8

def onClick(view)
  self.activity.send(self.method_name.to_s, view)
end