Class: CFG::SliceNode
Instance Attribute Summary collapse
-
#start_index ⇒ Object
readonly
Returns the value of attribute start_index.
-
#step ⇒ Object
readonly
Returns the value of attribute step.
-
#stop_index ⇒ Object
readonly
Returns the value of attribute stop_index.
Attributes inherited from ASTNode
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(start_index, stop_index, step) ⇒ SliceNode
constructor
A new instance of SliceNode.
- #to_s ⇒ Object
Constructor Details
#initialize(start_index, stop_index, step) ⇒ SliceNode
Returns a new instance of SliceNode.
807 808 809 810 811 812 |
# File 'lib/CFG/config.rb', line 807 def initialize(start_index, stop_index, step) super(:COLON) @start_index = start_index @stop_index = stop_index @step = step end |
Instance Attribute Details
#start_index ⇒ Object (readonly)
Returns the value of attribute start_index.
803 804 805 |
# File 'lib/CFG/config.rb', line 803 def start_index @start_index end |
#step ⇒ Object (readonly)
Returns the value of attribute step.
805 806 807 |
# File 'lib/CFG/config.rb', line 805 def step @step end |
#stop_index ⇒ Object (readonly)
Returns the value of attribute stop_index.
804 805 806 |
# File 'lib/CFG/config.rb', line 804 def stop_index @stop_index end |
Instance Method Details
#==(other) ⇒ Object
818 819 820 821 |
# File 'lib/CFG/config.rb', line 818 def ==(other) @kind == other.kind && @start_index == other.start_index && @stop_index == other.stop_index && @step == other.step end |
#to_s ⇒ Object
814 815 816 |
# File 'lib/CFG/config.rb', line 814 def to_s "SliceNode(#{@start_index}:#{@stop_index}:#{@step})" end |