Class: Luoma::Item
- Inherits:
-
Object
- Object
- Luoma::Item
- Defined in:
- lib/luoma/expression.rb,
sig/luoma/expression.rbs
Instance Attribute Summary collapse
-
#expr ⇒ Expression
readonly
Returns the value of attribute expr.
-
#key ⇒ Name
readonly
Returns the value of attribute key.
-
#token ⇒ t_token
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#children ⇒ ::Array[_Traversable]
() -> Array.
-
#initialize(token, key, expr) ⇒ Item
constructor
(t_token, Name, Expression) -> void.
-
#to_s ⇒ ::String
() -> String.
Constructor Details
#initialize(token, key, expr) ⇒ Item
(t_token, Name, Expression) -> void
1037 1038 1039 1040 1041 |
# File 'lib/luoma/expression.rb', line 1037 def initialize(token, key, expr) @token = token @key = key @expr = expr end |
Instance Attribute Details
#expr ⇒ Expression (readonly)
Returns the value of attribute expr.
1034 1035 1036 |
# File 'lib/luoma/expression.rb', line 1034 def expr @expr end |
#key ⇒ Name (readonly)
Returns the value of attribute key.
1034 1035 1036 |
# File 'lib/luoma/expression.rb', line 1034 def key @key end |
#token ⇒ t_token (readonly)
Returns the value of attribute token.
1034 1035 1036 |
# File 'lib/luoma/expression.rb', line 1034 def token @token end |
Instance Method Details
#children ⇒ ::Array[_Traversable]
() -> Array
382 383 384 |
# File 'sig/luoma/expression.rbs', line 382 def children [@expr] end |
#to_s ⇒ ::String
() -> String
1048 1049 1050 |
# File 'lib/luoma/expression.rb', line 1048 def to_s "#{@key}: #{@expr}" end |