Class: Apiary::Command::Help

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

Overview

Display help

Class Method Summary (collapse)

Class Method Details



12
13
14
15
# File 'lib/apiary/command/help.rb', line 12

def self.banner
  puts "\nUsage: apiary command [options]"
  puts "Try 'apiary help' for more information."
end

+ (Object) commands



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/apiary/command/help.rb', line 17

def self.commands
  puts "\nCurrently available apiary commands are:\n\n"
  puts "\tpreview                                     Show API documentation in default browser"
  puts "\tpreview --browser [chrome|safari|firefox]   Show API documentation in specified browser"
  puts "\tpreview --path [PATH]                       Specify path to blueprint file"
  puts "\tpreview --api_host [HOST]                   Specify apiary host"
  puts "\tpreview --server                            Start standalone web server on port 8080"
  puts "\tpreview --server --port [PORT]              Start standalone web server on specified port"
  puts "\n"
  puts "\thelp                                        Show help"
  puts "\n"
  puts "\tversion                                     Show version"
  puts "\n"
end

+ (Object) execute(options)



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

def self.execute(options)
  banner
  commands
end