Class: Ruby::Rego::AST::Call

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

Overview

Represents a function or built-in call.

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(name:, args:, location: nil) ⇒ Call

Returns a new instance of Call.

Parameters:

  • name (Object)
  • args (Array<Object>)
  • location (Location, nil) (defaults to: nil)


13
14
15
16
17
# File 'lib/ruby/rego/ast/call.rb', line 13

def initialize(name:, args:, location: nil)
  super(location: location)
  @name = name
  @args = args.dup.freeze
end

Instance Attribute Details

#argsArray<Object> (readonly)

Returns:

  • (Array<Object>)


23
24
25
# File 'lib/ruby/rego/ast/call.rb', line 23

def args
  @args
end

#nameObject (readonly)

Returns:

  • (Object)


20
21
22
# File 'lib/ruby/rego/ast/call.rb', line 20

def name
  @name
end