Class: Thor::AppWorker
- Inherits:
-
Application
- Object
- Bsl::Application
- Application
- Thor::AppWorker
- Defined in:
- lib/ThorWorker.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#optpars ⇒ Object
Returns the value of attribute optpars.
Attributes inherited from Application
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ AppWorker
constructor
A new instance of AppWorker.
-
#main ⇒ Object
Main entry-point.
Methods inherited from Application
#amqp_handle_failure, #amqp_loop, #amqp_start, #amqp_stop, #run
Constructor Details
#initialize(opts = {}) ⇒ AppWorker
Returns a new instance of AppWorker.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ThorWorker.rb', line 26 def initialize(opts = {}) super(opts) # Event Machine options [:em_port] = 8467 # Thor on cell-phone keyboard [:em_auth_token] = "" initialize_optparser { |opts| ############################ # EventMachine Section ############################ # EM Port opts.on( '-ep', '--em-port NUM', "EventMachine port") do |port| [:em_port] = port end # EM Authentication token opts.on( '-eat', '--em-auth-token STRING', "Authentication token used for communication with EM") do |token| [:em_auth_token] = token end } end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
24 25 26 |
# File 'lib/ThorWorker.rb', line 24 def @options end |
#optpars ⇒ Object
Returns the value of attribute optpars.
24 25 26 |
# File 'lib/ThorWorker.rb', line 24 def optpars @optpars end |
Instance Method Details
#main ⇒ Object
Main entry-point
50 51 52 |
# File 'lib/ThorWorker.rb', line 50 def main super() end |