Class: AMQClickListener
- Inherits:
-
Object
- Object
- AMQClickListener
- Defined in:
- lib/android_motion_query/events.rb
Instance Attribute Summary collapse
-
#activity ⇒ Object
Returns the value of attribute activity.
-
#method_name ⇒ Object
Returns the value of attribute method_name.
Instance Method Summary collapse
-
#initialize(activity, method_name) ⇒ AMQClickListener
constructor
A new instance of AMQClickListener.
- #onClick(view) ⇒ Object
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
#activity ⇒ Object
Returns the value of attribute activity.
2 3 4 |
# File 'lib/android_motion_query/events.rb', line 2 def activity @activity end |
#method_name ⇒ Object
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 |