Class: Sprinkle::Commands::Command

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

Direct Known Subclasses

Reconnect, Transfer

Instance Method Summary collapse

Constructor Details

#initialize(str, opts = {}) ⇒ Command

Returns a new instance of Command.



5
6
7
8
9
10
# File 'lib/sprinkle/commands/command.rb', line 5

def initialize(str, opts = {})
  @sudo = opts[:sudo]
  @str = str
  # this is a dummy class for now, not intended to be used directly
  raise
end

Instance Method Details

#stringObject



16
17
18
19
# File 'lib/sprinkle/commands/command.rb', line 16

def string
  # TODO: sudo
  @str
end

#sudo?Boolean

Returns:

  • (Boolean)


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

def sudo?
  @sudo
end