Class: Smith::Tool::InvocationRequest
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Smith::Tool::InvocationRequest
- 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
-
#argument_byte_count ⇒ Object
readonly
Returns the value of attribute argument_byte_count.
-
#argument_node_count ⇒ Object
readonly
Returns the value of attribute argument_node_count.
Instance Method Summary collapse
-
#initialize ⇒ InvocationRequest
constructor
A new instance of InvocationRequest.
Constructor Details
#initialize ⇒ InvocationRequest
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_count ⇒ Object (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_count ⇒ Object (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 |