Class: AgentCliRuntime::InspectionCommand
- Inherits:
-
Data
- Object
- Data
- AgentCliRuntime::InspectionCommand
- Defined in:
- lib/agent_cli_runtime/values.rb
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#credential_environment_keys ⇒ Object
readonly
Returns the value of attribute credential_environment_keys.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#message_id ⇒ Object
readonly
Returns the value of attribute message_id.
-
#session_id ⇒ Object
readonly
Returns the value of attribute session_id.
-
#stdin_data ⇒ Object
readonly
Returns the value of attribute stdin_data.
Instance Method Summary collapse
- #environment_for(env: ENV) ⇒ Object
-
#initialize(argv:, environment:, credential_environment_keys:, session_id:, message_id:, stdin_data: nil) ⇒ InspectionCommand
constructor
A new instance of InspectionCommand.
Constructor Details
#initialize(argv:, environment:, credential_environment_keys:, session_id:, message_id:, stdin_data: nil) ⇒ InspectionCommand
Returns a new instance of InspectionCommand.
537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/agent_cli_runtime/values.rb', line 537 def initialize(argv:, environment:, credential_environment_keys:, session_id:, message_id:, stdin_data: nil) super( argv: Immutable.strings(argv), stdin_data: stdin_data.nil? ? nil : Immutable.string(stdin_data), environment: Immutable.hash(environment), credential_environment_keys: Immutable.strings(credential_environment_keys), session_id: Immutable.string(session_id), message_id: Immutable.string() ) end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv
533 534 535 |
# File 'lib/agent_cli_runtime/values.rb', line 533 def argv @argv end |
#credential_environment_keys ⇒ Object (readonly)
Returns the value of attribute credential_environment_keys
533 534 535 |
# File 'lib/agent_cli_runtime/values.rb', line 533 def credential_environment_keys @credential_environment_keys end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment
533 534 535 |
# File 'lib/agent_cli_runtime/values.rb', line 533 def environment @environment end |
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id
533 534 535 |
# File 'lib/agent_cli_runtime/values.rb', line 533 def @message_id end |
#session_id ⇒ Object (readonly)
Returns the value of attribute session_id
533 534 535 |
# File 'lib/agent_cli_runtime/values.rb', line 533 def session_id @session_id end |
#stdin_data ⇒ Object (readonly)
Returns the value of attribute stdin_data
533 534 535 |
# File 'lib/agent_cli_runtime/values.rb', line 533 def stdin_data @stdin_data end |
Instance Method Details
#environment_for(env: ENV) ⇒ Object
550 551 552 553 554 555 556 |
# File 'lib/agent_cli_runtime/values.rb', line 550 def environment_for(env: ENV) selected = credential_environment_keys.each_with_object({}) do |key, values| value = env[key] values[key] = value.to_s unless value.to_s.empty? end selected.merge(environment).freeze end |