Class: Dhaka::LexerSpecificationItem
- Inherits:
-
Object
- Object
- Dhaka::LexerSpecificationItem
- Includes:
- Comparable
- Defined in:
- lib/dhaka/lexer/specification.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(pattern, priority, action) ⇒ LexerSpecificationItem
constructor
A new instance of LexerSpecificationItem.
Constructor Details
#initialize(pattern, priority, action) ⇒ LexerSpecificationItem
Returns a new instance of LexerSpecificationItem.
87 88 89 |
# File 'lib/dhaka/lexer/specification.rb', line 87 def initialize(pattern, priority, action) @pattern, @priority, @action = pattern, priority, action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
86 87 88 |
# File 'lib/dhaka/lexer/specification.rb', line 86 def action @action end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
86 87 88 |
# File 'lib/dhaka/lexer/specification.rb', line 86 def pattern @pattern end |
#priority ⇒ Object (readonly)
Returns the value of attribute priority.
86 87 88 |
# File 'lib/dhaka/lexer/specification.rb', line 86 def priority @priority end |
Instance Method Details
#<=>(other) ⇒ Object
91 92 93 |
# File 'lib/dhaka/lexer/specification.rb', line 91 def <=> other priority <=> other.priority end |