Class: KitchenHooks::Main

Inherits:
Thor
  • Object
show all
Defined in:
lib/kitchen_hooks/main.rb

Instance Method Summary collapse

Instance Method Details

#art ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/kitchen_hooks/main.rb', line 16

def art
  w = ART.lines.map(&:length).sort.last
  w += 1 if w % 2 != 0
  puts
  puts 'kitchen_hooks'.center(w)
  puts VERSION.center(w)
  puts
  puts SUMMARY.center(w)
  puts "\n\n\n"
  puts ART
  puts "\n\n\n"
end

#server ⇒ Object



56
57
58
59
60
61
62
63
# File 'lib/kitchen_hooks/main.rb', line 56

def server
  App.db! options.database
  App.config! JSON::parse(File.read(options.config))
  App.set :environment, options.environment
  App.set :port, options.port
  App.set :bind, options.bind
  App.run!
end

#version ⇒ Object



10
11
12
# File 'lib/kitchen_hooks/main.rb', line 10

def version
  puts VERSION
end