Class: Luoma::Spread
- Inherits:
-
Object
- Object
- Luoma::Spread
- Defined in:
- lib/luoma/expression.rb,
sig/luoma/expression.rbs
Instance Attribute Summary collapse
-
#expr ⇒ Expression
readonly
Returns the value of attribute expr.
-
#token ⇒ t_token
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#children ⇒ ::Array[_Traversable]
() -> Array.
-
#initialize(token, expr) ⇒ Spread
constructor
A new instance of Spread.
-
#to_s ⇒ ::String
() -> String.
Constructor Details
#initialize(token, expr) ⇒ Spread
Returns a new instance of Spread.
1018 1019 1020 1021 |
# File 'lib/luoma/expression.rb', line 1018 def initialize(token, expr) @token = token @expr = expr end |
Instance Attribute Details
#expr ⇒ Expression (readonly)
Returns the value of attribute expr.
1015 1016 1017 |
# File 'lib/luoma/expression.rb', line 1015 def expr @expr end |
#token ⇒ t_token (readonly)
Returns the value of attribute token.
1015 1016 1017 |
# File 'lib/luoma/expression.rb', line 1015 def token @token end |
Instance Method Details
#children ⇒ ::Array[_Traversable]
() -> Array
359 360 361 |
# File 'sig/luoma/expression.rbs', line 359 def children [@expr] end |
#to_s ⇒ ::String
() -> String
1028 1029 1030 |
# File 'lib/luoma/expression.rb', line 1028 def to_s "...#{@expr}" end |