Class: Stackdo::MethodReference
- Inherits:
-
Struct
- Object
- Struct
- Stackdo::MethodReference
- Defined in:
- lib/stackdo.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
12 13 14 |
# File 'lib/stackdo.rb', line 12 def name @name end |
#receiver ⇒ Object
Returns the value of attribute receiver
12 13 14 |
# File 'lib/stackdo.rb', line 12 def receiver @receiver end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/stackdo.rb', line 13 def to_s case receiver when Module then "#{receiver}.#{name}" when Class then "#{receiver}##{name}" else receiver.to_s end end |