Class: Crowbar::Client::Command::Base

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::NumberHelper
Defined in:
lib/crowbar/client/command/base.rb

Overview

Base that provides methods shared between command implementations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdin, stdout, stderr, options = {}, args = {}) ⇒ Base

Returns a new instance of Base.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/crowbar/client/command/base.rb', line 35

def initialize(stdin, stdout, stderr, options = {}, args = {})
  self.stdin = stdin
  self.stdout = stdout
  self.stderr = stderr

  self.options = Hashie::Mash.new(
    options
  )

  self.args = Hashie::Mash.new(
    args
  )

  checks
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



33
34
35
# File 'lib/crowbar/client/command/base.rb', line 33

def args
  @args
end

#optionsObject

Returns the value of attribute options.



32
33
34
# File 'lib/crowbar/client/command/base.rb', line 32

def options
  @options
end

#stderrObject

Returns the value of attribute stderr.



31
32
33
# File 'lib/crowbar/client/command/base.rb', line 31

def stderr
  @stderr
end

#stdinObject

Returns the value of attribute stdin.



29
30
31
# File 'lib/crowbar/client/command/base.rb', line 29

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout.



30
31
32
# File 'lib/crowbar/client/command/base.rb', line 30

def stdout
  @stdout
end