Class: SleepingKingStudios::Docs::Commands::Installation::InstallJekyll

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

Overview

Installs the Jekyll application.

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ InstallJekyll

Returns a new instance of InstallJekyll.

Parameters:

  • options (Hash)

    additional options for the command.

Options Hash (**options):

  • description (String)

    a short description of the documented library.

  • dry_run (Boolean)

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

  • name (String)

    the name of the documented library.

  • repository (String)

    the URL of the library repository.

  • verbose (Boolean)

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



24
25
26
27
28
29
30
# File 'lib/sleeping_king_studios/docs/commands/installation/install_jekyll.rb', line 24

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

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

Instance Method Details

#descriptionString

Returns a short description of the documented library.

Returns:

  • (String)

    a short description of the documented library.



33
34
35
# File 'lib/sleeping_king_studios/docs/commands/installation/install_jekyll.rb', line 33

def description
  @options.fetch(:description, 'A Ruby library.')
end

#dry_run?Boolean

Returns if true, does not apply filesystem changes.

Returns:

  • (Boolean)

    if true, does not apply filesystem changes.



38
39
40
# File 'lib/sleeping_king_studios/docs/commands/installation/install_jekyll.rb', line 38

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

#nameString

Returns the name of the documented library.

Returns:

  • (String)

    the name of the documented library.



43
44
45
# File 'lib/sleeping_king_studios/docs/commands/installation/install_jekyll.rb', line 43

def name
  @options.fetch(:name, 'Library Name')
end

#repositoryString

Returns the URL of the library repository.

Returns:

  • (String)

    the URL of the library repository.



48
49
50
# File 'lib/sleeping_king_studios/docs/commands/installation/install_jekyll.rb', line 48

def repository
  @options.fetch(:repository, 'www.example.com')
end

#verbose?Boolean

Returns if true, prints updates to STDOUT.

Returns:

  • (Boolean)

    if true, prints updates to STDOUT.



53
54
55
# File 'lib/sleeping_king_studios/docs/commands/installation/install_jekyll.rb', line 53

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