Class: Verneuil::Method
- Inherits:
-
Struct
- Object
- Struct
- Verneuil::Method
- Defined in:
- lib/verneuil/method.rb
Overview
Represents a method that can be called.
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#name ⇒ Object
Returns the value of attribute name.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
Instance Method Summary collapse
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address
4 5 6 |
# File 'lib/verneuil/method.rb', line 4 def address @address end |
#name ⇒ Object
Returns the value of attribute name
4 5 6 |
# File 'lib/verneuil/method.rb', line 4 def name @name end |
#receiver ⇒ Object
Returns the value of attribute receiver
4 5 6 |
# File 'lib/verneuil/method.rb', line 4 def receiver @receiver end |
Instance Method Details
#invoke(process, recv_obj) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/verneuil/method.rb', line 5 def invoke(process, recv_obj) if receiver process.call address, recv_obj else process.call address end throw :verneuil_code end |