Class: Sabbath

Inherits:
Object
  • Object
show all
Defined in:
lib/sabbath.rb,
lib/sabbath/server.rb,
lib/sabbath/backend/beanstalk.rb

Defined Under Namespace

Classes: Backend, Server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Sabbath

Returns a new instance of Sabbath.



16
17
18
19
# File 'lib/sabbath.rb', line 16

def initialize(options)
  @options = options
  @backend = Backend::Beanstalk.new(options[:host], options[:port])
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



14
15
16
# File 'lib/sabbath.rb', line 14

def options
  @options
end

Instance Method Details

#startObject



21
22
23
# File 'lib/sabbath.rb', line 21

def start
  Server.new(@backend, options[:web_host], options[:web_port], options[:rackup]).start
end