Class: Foxtail::Bundle::Parser::AST::SelectExpression
- Inherits:
-
Data
- Object
- Data
- Foxtail::Bundle::Parser::AST::SelectExpression
- Defined in:
- lib/foxtail/bundle/parser/ast.rb,
lib/foxtail/bundle/parser/ast.rb
Overview
Select expression for pluralization and variants
Instance Attribute Summary collapse
-
#selector ⇒ Object
readonly
The expression to match against.
-
#star ⇒ Object
readonly
- Integer
-
Index of the default variant.
-
#variants ⇒ Object
readonly
- Array<Variant>
-
The variant branches.
Instance Method Summary collapse
-
#initialize(selector:, variants:, star: 0) ⇒ SelectExpression
constructor
A new instance of SelectExpression.
Constructor Details
#initialize(selector:, variants:, star: 0) ⇒ SelectExpression
Returns a new instance of SelectExpression.
94 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 94 def initialize(selector:, variants:, star: 0) = super |
Instance Attribute Details
#selector ⇒ Object (readonly)
The expression to match against
90 91 92 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 90 def selector @selector end |
#star ⇒ Object (readonly)
- Integer
-
Index of the default variant
90 91 92 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 90 def star @star end |
#variants ⇒ Object (readonly)
- Array<Variant>
-
The variant branches
90 91 92 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 90 def variants @variants end |