Class: Command::BaseCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/command/base_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rvm_prefix = nil, options = {}) ⇒ BaseCommand

Returns a new instance of BaseCommand.



7
8
9
10
# File 'lib/command/base_command.rb', line 7

def initialize(rvm_prefix = nil, options = {})
  @rvm_prefix = rvm_prefix
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/command/base_command.rb', line 5

def options
  @options
end

#rvm_prefixObject (readonly)

Returns the value of attribute rvm_prefix.



5
6
7
# File 'lib/command/base_command.rb', line 5

def rvm_prefix
  @rvm_prefix
end

Instance Method Details

#cancelObject

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/command/base_command.rb', line 16

def cancel
  raise NotImplementedError
end

#executeObject



12
13
14
# File 'lib/command/base_command.rb', line 12

def execute
  system(name) or raise Command::ExecuteError
end

#nameObject

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/command/base_command.rb', line 20

def name
  raise NotImplementedError
end