Class: Minds::DatabaseConfig
- Inherits:
-
Object
- Object
- Minds::DatabaseConfig
- Defined in:
- lib/minds/datasources.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#connection_data ⇒ Object
Returns the value of attribute connection_data.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#engine ⇒ Object
Returns the value of attribute engine.
-
#name ⇒ Object
Returns the value of attribute name.
-
#tables ⇒ Object
Returns the value of attribute tables.
Instance Method Summary collapse
-
#initialize(name:, engine:, description:, connection_data: {}, tables: [], created_at: nil) ⇒ DatabaseConfig
constructor
A new instance of DatabaseConfig.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, engine:, description:, connection_data: {}, tables: [], created_at: nil) ⇒ DatabaseConfig
Returns a new instance of DatabaseConfig.
5 6 7 8 9 10 11 12 |
# File 'lib/minds/datasources.rb', line 5 def initialize(name:, engine:, description:, connection_data: {}, tables: [], created_at: nil) @name = name @engine = engine @description = description @connection_data = connection_data @tables = tables @created_at = created_at end |
Instance Attribute Details
#connection_data ⇒ Object
Returns the value of attribute connection_data.
3 4 5 |
# File 'lib/minds/datasources.rb', line 3 def connection_data @connection_data end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/minds/datasources.rb', line 3 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/minds/datasources.rb', line 3 def description @description end |
#engine ⇒ Object
Returns the value of attribute engine.
3 4 5 |
# File 'lib/minds/datasources.rb', line 3 def engine @engine end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/minds/datasources.rb', line 3 def name @name end |
#tables ⇒ Object
Returns the value of attribute tables.
3 4 5 |
# File 'lib/minds/datasources.rb', line 3 def tables @tables end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/minds/datasources.rb', line 14 def to_h { name: @name, engine: @engine, description: @description, connection_data: @connection_data, tables: @tables } end |