Class: Lrama::Grammar::Type
- Inherits:
-
Object
- Object
- Lrama::Grammar::Type
- Defined in:
- lib/lrama/grammar/type.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id:, tag:) ⇒ Type
constructor
A new instance of Type.
Constructor Details
#initialize(id:, tag:) ⇒ Type
8 9 10 11 |
# File 'lib/lrama/grammar/type.rb', line 8 def initialize(id:, tag:) @id = id @tag = tag end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/lrama/grammar/type.rb', line 6 def id @id end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
6 7 8 |
# File 'lib/lrama/grammar/type.rb', line 6 def tag @tag end |
Instance Method Details
#==(other) ⇒ Object
13 14 15 16 17 |
# File 'lib/lrama/grammar/type.rb', line 13 def ==(other) self.class == other.class && self.id == other.id && self.tag == other.tag end |