Class: Mammoth::Commands::StatusCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/mammoth/commands/status_command.rb

Overview

Reusable local command object for status inspection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, sqlite_store: nil, output: $stdout) ⇒ StatusCommand

Returns a new instance of StatusCommand.

Parameters:



13
14
15
16
17
# File 'lib/mammoth/commands/status_command.rb', line 13

def initialize(config, sqlite_store: nil, output: $stdout)
  @config = config
  @sqlite_store = sqlite_store
  @output = output
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



8
9
10
# File 'lib/mammoth/commands/status_command.rb', line 8

def config
  @config
end

#outputObject (readonly)

Returns the value of attribute output.



8
9
10
# File 'lib/mammoth/commands/status_command.rb', line 8

def output
  @output
end

#sqlite_storeObject (readonly)

Returns the value of attribute sqlite_store.



8
9
10
# File 'lib/mammoth/commands/status_command.rb', line 8

def sqlite_store
  @sqlite_store
end

Instance Method Details

#callInteger

Execute the status command.

Returns:

  • (Integer)

    process-style status code



22
23
24
25
# File 'lib/mammoth/commands/status_command.rb', line 22

def call
  Status.call(config, sqlite_store: sqlite_store, output: output)
  0
end