Class: Yetty::Site

Inherits:
Command show all
Defined in:
lib/yetty/site.rb,
lib/yetty/site/app.rb

Defined Under Namespace

Classes: App

Constant Summary

Constants inherited from Command

Command::DEFAULT_CONFIGURATION_FILES

Instance Attribute Summary

Attributes inherited from Command

#arguments, #options, #ui

Instance Method Summary collapse

Methods inherited from Command

#initialize

Constructor Details

This class inherits a constructor from Yetty::Command

Instance Method Details

#execute!Object

Start the web UI

Returns:

  • true



11
12
13
14
15
16
17
18
19
20
# File 'lib/yetty/site.rb', line 11

def execute!
  if(opts[:port])
    App.port = opts[:port]
  end
  if(opts[:bind])
    App.bind = opts[:bind]
  end
  App.server = options.fetch(:server, 'webrick')
  App.run!
end