Class: SleepingKingStudios::Docs::Commands::Installation::InstallWorkflow

Inherits:
Cuprum::Command
  • Object
show all
Defined in:
lib/sleeping_king_studios/docs/commands/installation/install_workflow.rb

Overview

Installs the GitHub pages CI workflow.

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ InstallWorkflow

Returns a new instance of InstallWorkflow.

Parameters:

  • options (Hash)

    additional options for the command.

Options Hash (**options):

  • dry_run (Boolean)

    if true, does not apply filesystem changes. Defaults to false.

  • force (Boolean)

    if true, replaces existing template files.

  • verbose (Boolean)

    if true, prints updates to STDOUT. Defaults to true.



22
23
24
25
26
27
28
# File 'lib/sleeping_king_studios/docs/commands/installation/install_workflow.rb', line 22

def initialize(error_stream: $stderr, output_stream: $stdout, **options)
  super()

  @error_stream  = error_stream
  @output_stream = output_stream
  @options       = options
end

Instance Method Details

#dry_run?Boolean

Returns if true, does not apply filesystem changes.

Returns:

  • (Boolean)

    if true, does not apply filesystem changes.



31
32
33
# File 'lib/sleeping_king_studios/docs/commands/installation/install_workflow.rb', line 31

def dry_run?
  @options.fetch(:dry_run, false)
end

#force?Boolean

Returns if true, overwrites existing template files.

Returns:

  • (Boolean)

    if true, overwrites existing template files.



36
37
38
# File 'lib/sleeping_king_studios/docs/commands/installation/install_workflow.rb', line 36

def force?
  @options.fetch(:force, false)
end

#verbose?Boolean

Returns if true, prints updates to STDOUT.

Returns:

  • (Boolean)

    if true, prints updates to STDOUT.



41
42
43
# File 'lib/sleeping_king_studios/docs/commands/installation/install_workflow.rb', line 41

def verbose?
  @options.fetch(:verbose, true)
end