Class: Bookbinder::Commands::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/bookbinder/commands/help.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logger, usage_message) ⇒ Help

Returns a new instance of Help.



4
5
6
7
# File 'lib/bookbinder/commands/help.rb', line 4

def initialize(logger, usage_message)
  @logger = logger
  @usage_message = usage_message
end

Class Method Details

.command_nameObject



13
14
15
# File 'lib/bookbinder/commands/help.rb', line 13

def self.command_name
  '--help'
end

.to_sObject



9
10
11
# File 'lib/bookbinder/commands/help.rb', line 9

def self.to_s
  'help'
end

.usageObject



17
18
19
# File 'lib/bookbinder/commands/help.rb', line 17

def self.usage
  "--help \t \t \t \t \t Print this message"
end

Instance Method Details

#runObject



21
22
23
24
# File 'lib/bookbinder/commands/help.rb', line 21

def run(*)
  logger.log(usage_message)
  0
end