Class: Tco::Segment
- Inherits:
-
Object
- Object
- Tco::Segment
- Defined in:
- lib/tco/parser.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#==(other) ⇒ Object
For rspec assertions.
-
#initialize(value, params) ⇒ Segment
constructor
A new instance of Segment.
- #to_s ⇒ Object
Constructor Details
#initialize(value, params) ⇒ Segment
Returns a new instance of Segment.
41 42 43 44 |
# File 'lib/tco/parser.rb', line 41 def initialize(value, params) @value = value @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
39 40 41 |
# File 'lib/tco/parser.rb', line 39 def params @params end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
39 40 41 |
# File 'lib/tco/parser.rb', line 39 def value @value end |
Instance Method Details
#==(other) ⇒ Object
For rspec assertions
51 52 53 |
# File 'lib/tco/parser.rb', line 51 def ==(other) @value == other.value && @params == other.params end |
#to_s ⇒ Object
46 47 48 |
# File 'lib/tco/parser.rb', line 46 def to_s @value end |