Class: Ruby::Rego::AST::Package

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby/rego/ast/package.rb

Overview

Represents a package declaration.

Instance Attribute Summary collapse

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods inherited from Base

#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s

Constructor Details

#initialize(path:, location: nil) ⇒ Package

Returns a new instance of Package.

Parameters:

  • path (Array<String>)
  • location (Location, nil) (defaults to: nil)


12
13
14
15
# File 'lib/ruby/rego/ast/package.rb', line 12

def initialize(path:, location: nil)
  super(location: location)
  @path = path
end

Instance Attribute Details

#pathArray<String> (readonly)

Returns:

  • (Array<String>)


18
19
20
# File 'lib/ruby/rego/ast/package.rb', line 18

def path
  @path
end