Class: HK::Server
- Inherits:
-
Rack::Server
- Object
- Rack::Server
- HK::Server
- Defined in:
- lib/hotchkiss/server.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ Server
constructor
A new instance of Server.
- #options ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(options) ⇒ Server
Returns a new instance of Server.
5 6 7 |
# File 'lib/hotchkiss/server.rb', line 5 def initialize() @options = end |
Class Method Details
.start!(options) ⇒ Object
9 10 11 |
# File 'lib/hotchkiss/server.rb', line 9 def self.start!() new().start end |
Instance Method Details
#options ⇒ Object
13 14 15 |
# File 'lib/hotchkiss/server.rb', line 13 def @options end |
#start ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/hotchkiss/server.rb', line 17 def start time = Time.now.strftime("%Y-%m-%d %H:%M:%S") puts "[#{time}] => Hotchkiss - #{HK::VERSION} version" puts "[#{time}] => It rolls on http://#{[:Host]}:#{[:Port]}" [:INT, :TERM].each { |sig| trap(sig) { exit } } super end |