Class: Synthra::Parser::AST::ProbabilityDirective
- Inherits:
-
DirectiveNode
- Object
- Node
- DirectiveNode
- Synthra::Parser::AST::ProbabilityDirective
- Defined in:
- lib/synthra/parser/ast.rb
Overview
Probability directive
Sets the probability of this scenario being selected.
Instance Attribute Summary collapse
-
#percentage ⇒ Object
readonly
Returns the value of attribute percentage.
Instance Method Summary collapse
-
#initialize(percentage:, line: nil) ⇒ ProbabilityDirective
constructor
Create a new ProbabilityDirective.
Constructor Details
#initialize(percentage:, line: nil) ⇒ ProbabilityDirective
Create a new ProbabilityDirective
1177 1178 1179 1180 |
# File 'lib/synthra/parser/ast.rb', line 1177 def initialize(percentage:, line: nil) super(line: line) @percentage = percentage end |
Instance Attribute Details
#percentage ⇒ Object (readonly)
Returns the value of attribute percentage.
1169 1170 1171 |
# File 'lib/synthra/parser/ast.rb', line 1169 def percentage @percentage end |