Class: Ruby::Rego::AST::TemplateString
- Defined in:
- lib/ruby/rego/ast/literal.rb
Overview
Represents a template string with interpolations.
Instance Attribute Summary collapse
-
#parts ⇒ Array<Object>
readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(parts:, location: nil) ⇒ TemplateString
constructor
A new instance of TemplateString.
Methods inherited from Base
#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s
Constructor Details
#initialize(parts:, location: nil) ⇒ TemplateString
Returns a new instance of TemplateString.
34 35 36 37 |
# File 'lib/ruby/rego/ast/literal.rb', line 34 def initialize(parts:, location: nil) super(location: location) @parts = parts.dup.freeze end |
Instance Attribute Details
#parts ⇒ Array<Object> (readonly)
40 41 42 |
# File 'lib/ruby/rego/ast/literal.rb', line 40 def parts @parts end |