Class: Fast::Source::Map
- Inherits:
-
Object
- Object
- Fast::Source::Map
- Defined in:
- lib/fast/source.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
Returns the value of attribute expression.
-
#node ⇒ Object
Returns the value of attribute node.
Instance Method Summary collapse
- #begin ⇒ Object
- #end ⇒ Object
-
#initialize(expression) ⇒ Map
constructor
A new instance of Map.
- #with_expression(new_expression) ⇒ Object
- #with_operator(operator) ⇒ Object
Constructor Details
#initialize(expression) ⇒ Map
Returns a new instance of Map.
73 74 75 |
# File 'lib/fast/source.rb', line 73 def initialize(expression) @expression = expression end |
Instance Attribute Details
#expression ⇒ Object
Returns the value of attribute expression.
71 72 73 |
# File 'lib/fast/source.rb', line 71 def expression @expression end |
#node ⇒ Object
Returns the value of attribute node.
71 72 73 |
# File 'lib/fast/source.rb', line 71 def node @node end |
Instance Method Details
#begin ⇒ Object
77 78 79 |
# File 'lib/fast/source.rb', line 77 def begin expression.begin_pos end |
#end ⇒ Object
81 82 83 |
# File 'lib/fast/source.rb', line 81 def end expression.end_pos end |
#with_expression(new_expression) ⇒ Object
85 86 87 |
# File 'lib/fast/source.rb', line 85 def with_expression(new_expression) duplicate_with(expression: new_expression) end |
#with_operator(operator) ⇒ Object
89 90 91 |
# File 'lib/fast/source.rb', line 89 def with_operator(operator) duplicate_with(operator: operator) end |