Class: Ruby::Rego::AST::Variable
- Defined in:
- lib/ruby/rego/ast/variable.rb
Overview
Represents a variable identifier.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name:, location: nil) ⇒ Variable
constructor
A new instance of Variable.
Methods inherited from Base
#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s
Constructor Details
#initialize(name:, location: nil) ⇒ Variable
Returns a new instance of Variable.
12 13 14 15 |
# File 'lib/ruby/rego/ast/variable.rb', line 12 def initialize(name:, location: nil) super(location: location) @name = name end |
Instance Attribute Details
#name ⇒ String (readonly)
18 19 20 |
# File 'lib/ruby/rego/ast/variable.rb', line 18 def name @name end |