Class: Ottogen::Otto

Inherits:
Thor
  • Object
show all
Defined in:
lib/ottogen/otto.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



13
14
15
# File 'lib/ottogen/otto.rb', line 13

def build
  Ottogen.build
end

#cleanObject



18
19
20
# File 'lib/ottogen/otto.rb', line 18

def clean
  Ottogen.clean
end

#initObject



8
9
10
# File 'lib/ottogen/otto.rb', line 8

def init
  Ottogen.init
end

#serveObject



28
29
30
31
32
33
# File 'lib/ottogen/otto.rb', line 28

def serve
  root = File.expand_path("#{Dir.pwd}/#{Ottogen::BUILD_DIR}")
  server = WEBrick::HTTPServer.new :Port => 8778, :DocumentRoot => root
  trap 'INT' do server.shutdown end
  server.start
end

#watchObject



23
24
25
# File 'lib/ottogen/otto.rb', line 23

def watch
  Ottogen.watch
end