Class: Mammoth::Commands::StatusCommand
- Inherits:
-
Object
- Object
- Mammoth::Commands::StatusCommand
- Defined in:
- lib/mammoth/commands/status_command.rb
Overview
Reusable local command object for status inspection.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#state_adapter ⇒ Object
readonly
Returns the value of attribute state_adapter.
Instance Method Summary collapse
-
#call ⇒ Integer
Execute the status command.
-
#initialize(config, state_adapter: nil, output: $stdout) ⇒ StatusCommand
constructor
A new instance of StatusCommand.
Constructor Details
#initialize(config, state_adapter: nil, output: $stdout) ⇒ StatusCommand
Returns a new instance of StatusCommand.
13 14 15 16 17 |
# File 'lib/mammoth/commands/status_command.rb', line 13 def initialize(config, state_adapter: nil, output: $stdout) @config = config @state_adapter = state_adapter || OperationalState::Registry.build_configured(config) @output = output end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/mammoth/commands/status_command.rb', line 8 def config @config end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
8 9 10 |
# File 'lib/mammoth/commands/status_command.rb', line 8 def output @output end |
#state_adapter ⇒ Object (readonly)
Returns the value of attribute state_adapter.
8 9 10 |
# File 'lib/mammoth/commands/status_command.rb', line 8 def state_adapter @state_adapter end |