Class: DBGet::Controller
- Inherits:
-
Object
- Object
- DBGet::Controller
- Includes:
- Constants
- Defined in:
- lib/dbget/controller.rb
Constant Summary
Constants included from Constants
DBGet::Constants::DBGET_CONFIG_FILE
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#connector ⇒ Object
readonly
Returns the value of attribute connector.
-
#databases ⇒ Object
readonly
Returns the value of attribute databases.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #boot ⇒ Object
-
#initialize(databases, options) ⇒ Controller
constructor
A new instance of Controller.
- #send_data! ⇒ Object
- #store_connections ⇒ Object
Constructor Details
#initialize(databases, options) ⇒ Controller
Returns a new instance of Controller.
7 8 9 10 11 |
# File 'lib/dbget/controller.rb', line 7 def initialize(databases, ) @databases = databases @options = @connections = [] end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/dbget/controller.rb', line 5 def config @config end |
#connector ⇒ Object (readonly)
Returns the value of attribute connector.
5 6 7 |
# File 'lib/dbget/controller.rb', line 5 def connector @connector end |
#databases ⇒ Object (readonly)
Returns the value of attribute databases.
5 6 7 |
# File 'lib/dbget/controller.rb', line 5 def databases @databases end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/dbget/controller.rb', line 5 def @options end |
Instance Method Details
#boot ⇒ Object
13 14 15 16 17 |
# File 'lib/dbget/controller.rb', line 13 def boot load_dbget_config @config = DBGet::Config.instance store_connections end |
#send_data! ⇒ Object
25 26 27 28 29 |
# File 'lib/dbget/controller.rb', line 25 def send_data! @connections.each do |connection| connection.send_data! end end |