Class: Chester::Command::Base

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/chester/commands/base.rb

Direct Known Subclasses

Brew, Generate, Install

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#home_directory, #running_on_a_mac?, #running_on_windows?

Constructor Details

#initialize(args) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/chester/commands/base.rb', line 6

def initialize(args)
  @args = args
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



5
6
7
# File 'lib/chester/commands/base.rb', line 5

def args
  @args
end

Instance Method Details

#display(msg, newline = true) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/chester/commands/base.rb', line 10

def display(msg, newline=true)
  if newline
    puts(msg)
  else
    print(msg)
    STDOUT.flush
  end
end