Class: Ruby::Rego::AST::Import
Overview
Represents an import declaration.
Instance Attribute Summary collapse
-
#alias ⇒ String?
readonly
-
#path ⇒ Array<String> | String
readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#alias_name ⇒ String?
-
#initialize(path:, alias_name: nil, location: nil) ⇒ Import
constructor
A new instance of Import.
Methods inherited from Base
#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s
Constructor Details
#initialize(path:, alias_name: nil, location: nil) ⇒ Import
Returns a new instance of Import.
13 14 15 16 17 |
# File 'lib/ruby/rego/ast/import.rb', line 13 def initialize(path:, alias_name: nil, location: nil) super(location: location) @path = path @alias = alias_name end |
Instance Attribute Details
#alias ⇒ String? (readonly)
23 24 25 |
# File 'lib/ruby/rego/ast/import.rb', line 23 def alias @alias end |
#path ⇒ Array<String> | String (readonly)
20 21 22 |
# File 'lib/ruby/rego/ast/import.rb', line 20 def path @path end |
Instance Method Details
#alias_name ⇒ String?
26 27 28 |
# File 'lib/ruby/rego/ast/import.rb', line 26 def alias_name self.alias end |