Class: MOSAIK::Syntax::Reference
- Inherits:
-
Object
- Object
- MOSAIK::Syntax::Reference
- Defined in:
- lib/mosaik/syntax/reference.rb
Overview
Reference to a method in the codebase
Instance Attribute Summary collapse
-
#constant ⇒ Object
readonly
Returns the value of attribute constant.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(constant, method) ⇒ Reference
constructor
A new instance of Reference.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(constant, method) ⇒ Reference
Returns a new instance of Reference.
11 12 13 14 |
# File 'lib/mosaik/syntax/reference.rb', line 11 def initialize(constant, method) @constant = constant @method = method end |
Instance Attribute Details
#constant ⇒ Object (readonly)
Returns the value of attribute constant.
9 10 11 |
# File 'lib/mosaik/syntax/reference.rb', line 9 def constant @constant end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
9 10 11 |
# File 'lib/mosaik/syntax/reference.rb', line 9 def method @method end |
Instance Method Details
#==(other) ⇒ Object
16 17 18 19 |
# File 'lib/mosaik/syntax/reference.rb', line 16 def ==(other) constant == other.constant && method == other.method end |
#inspect ⇒ Object
25 26 27 |
# File 'lib/mosaik/syntax/reference.rb', line 25 def inspect "#<Reference #{self}>" end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/mosaik/syntax/reference.rb', line 21 def to_s "#{constant}##{method}" end |