Class: Shhh::App::Commands::Command

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cli) ⇒ Command

Returns a new instance of Command


49
50
51
# File 'lib/shhh/app/commands/command.rb', line 49

def initialize(cli)
  self.cli = cli
end

Instance Attribute Details

#cliObject

Returns the value of attribute cli


47
48
49
# File 'lib/shhh/app/commands/command.rb', line 47

def cli
  @cli
end

Instance Method Details

#keyObject


57
58
59
# File 'lib/shhh/app/commands/command.rb', line 57

def key
  @key ||= cli.key
end

#optsObject


53
54
55
# File 'lib/shhh/app/commands/command.rb', line 53

def opts
  cli.opts
end

#runObject


61
62
63
# File 'lib/shhh/app/commands/command.rb', line 61

def run
  raise Shhh::Errors::AbstractMethodCalled.new(:run)
end