Class: Smith::Tool::InvocationRequest

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/smith/tool/invocation_request.rb

Constant Summary collapse

MAX_ARGUMENT_DEPTH =
ArgumentSnapshot::MAX_DEPTH
MAX_ARGUMENT_NODES =
ArgumentSnapshot::MAX_NODES
MAX_ARGUMENT_BYTES =
ArgumentSnapshot::MAX_BYTES

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInvocationRequest

Returns a new instance of InvocationRequest.



27
28
29
30
31
32
33
34
# File 'lib/smith/tool/invocation_request.rb', line 27

def initialize(...)
  super
  snapshot = ArgumentSnapshot.new(arguments).call
  @argument_node_count = snapshot.node_count
  @argument_byte_count = snapshot.byte_count
  @attributes = @attributes.merge(arguments: snapshot.value).freeze
  freeze
end

Instance Attribute Details

#argument_byte_countObject (readonly)

Returns the value of attribute argument_byte_count.



25
26
27
# File 'lib/smith/tool/invocation_request.rb', line 25

def argument_byte_count
  @argument_byte_count
end

#argument_node_countObject (readonly)

Returns the value of attribute argument_node_count.



25
26
27
# File 'lib/smith/tool/invocation_request.rb', line 25

def argument_node_count
  @argument_node_count
end