Class: Collie::AST::InlineRule
- Inherits:
-
Object
- Object
- Collie::AST::InlineRule
- Defined in:
- lib/collie/ast.rb
Overview
Lrama extension: Inline rule
Instance Attribute Summary collapse
-
#alternatives ⇒ Object
Returns the value of attribute alternatives.
-
#location ⇒ Object
Returns the value of attribute location.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#rule ⇒ Object
Returns the value of attribute rule.
Instance Method Summary collapse
-
#initialize(rule:, parameters: [], alternatives: [], location: nil) ⇒ InlineRule
constructor
A new instance of InlineRule.
Constructor Details
#initialize(rule:, parameters: [], alternatives: [], location: nil) ⇒ InlineRule
Returns a new instance of InlineRule.
169 170 171 172 173 174 |
# File 'lib/collie/ast.rb', line 169 def initialize(rule:, parameters: [], alternatives: [], location: nil) @rule = rule @parameters = parameters @alternatives = alternatives @location = location end |
Instance Attribute Details
#alternatives ⇒ Object
Returns the value of attribute alternatives.
167 168 169 |
# File 'lib/collie/ast.rb', line 167 def alternatives @alternatives end |
#location ⇒ Object
Returns the value of attribute location.
167 168 169 |
# File 'lib/collie/ast.rb', line 167 def location @location end |
#parameters ⇒ Object
Returns the value of attribute parameters.
167 168 169 |
# File 'lib/collie/ast.rb', line 167 def parameters @parameters end |
#rule ⇒ Object
Returns the value of attribute rule.
167 168 169 |
# File 'lib/collie/ast.rb', line 167 def rule @rule end |