Class: ParserCombinator::Item
- Inherits:
-
Object
- Object
- ParserCombinator::Item
- Defined in:
- lib/parser_combinator.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(item, tag) ⇒ Item
constructor
A new instance of Item.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(item, tag) ⇒ Item
Returns a new instance of Item.
30 31 32 |
# File 'lib/parser_combinator.rb', line 30 def initialize(item, tag) @item, @tag = item, tag end |
Instance Attribute Details
#item ⇒ Object (readonly)
Returns the value of attribute item.
28 29 30 |
# File 'lib/parser_combinator.rb', line 28 def item @item end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
28 29 30 |
# File 'lib/parser_combinator.rb', line 28 def tag @tag end |
Instance Method Details
#inspect ⇒ Object
38 39 40 |
# File 'lib/parser_combinator.rb', line 38 def inspect "Item {item = #{item}, tag = #{tag}}" end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/parser_combinator.rb', line 34 def to_s item.to_s end |