Class: Mode::Commands::Connect
- Inherits:
-
Object
- Object
- Mode::Commands::Connect
- Includes:
- Helpers
- Defined in:
- lib/mode/commands/connect.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#concurrency ⇒ Object
readonly
Returns the value of attribute concurrency.
Instance Method Summary collapse
- #execute(options = {}) ⇒ Object
-
#initialize(command, options = {}) ⇒ Connect
constructor
A new instance of Connect.
- #verify! ⇒ Object
Methods included from Helpers
#config, #config_dir, #config_exists?, #configure_api_requests!, #drivers_dir, #load_drivers!, #require_config!, #require_credentials!, #timer_block, #validate_config!
Constructor Details
#initialize(command, options = {}) ⇒ Connect
Returns a new instance of Connect.
10 11 12 13 |
# File 'lib/mode/commands/connect.rb', line 10 def initialize(command, = {}) @command = command @concurrency = [:concurrency] || 4 end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
7 8 9 |
# File 'lib/mode/commands/connect.rb', line 7 def command @command end |
#concurrency ⇒ Object (readonly)
Returns the value of attribute concurrency.
8 9 10 |
# File 'lib/mode/commands/connect.rb', line 8 def concurrency @concurrency end |
Instance Method Details
#execute(options = {}) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/mode/commands/connect.rb', line 15 def execute( = {}) validate_config! register! run_command! end |
#verify! ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/mode/commands/connect.rb', line 22 def verify! load_drivers! validate_config! configuration.data_sources.each do |data_source| verify_data_source!(data_source) end end |