Class: Hive::Controller::Shell
- Inherits:
-
Hive::Controller
- Object
- Hive::Controller
- Hive::Controller::Shell
- Defined in:
- lib/hive/controller/shell.rb
Overview
The Shell controller
Instance Attribute Summary
Attributes inherited from Hive::Controller
Instance Method Summary collapse
- #detect ⇒ Object
-
#initialize(options) ⇒ Shell
constructor
A new instance of Shell.
Methods inherited from Hive::Controller
Constructor Details
#initialize(options) ⇒ Shell
Returns a new instance of Shell.
8 9 10 11 12 |
# File 'lib/hive/controller/shell.rb', line 8 def initialize() Hive.logger.debug("options: #{options.inspect}") @workers = ['workers'] || 0 super end |
Instance Method Details
#detect ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/hive/controller/shell.rb', line 14 def detect Hive.logger.info('Creating shell devices') (1..@workers).collect do |i| Hive.logger.info(" Shell device #{i}") self.create_device('id' => i) end end |