Class: DataDuck::Database
- Inherits:
-
Object
- Object
- DataDuck::Database
- Defined in:
- lib/dataduck/database.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(name, *args) ⇒ Database
constructor
A new instance of Database.
- #query(sql) ⇒ Object
- #table_names ⇒ Object
Constructor Details
#initialize(name, *args) ⇒ Database
Returns a new instance of Database.
5 6 7 |
# File 'lib/dataduck/database.rb', line 5 def initialize(name, *args) self.name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/dataduck/database.rb', line 3 def name @name end |
Instance Method Details
#connection ⇒ Object
9 10 11 |
# File 'lib/dataduck/database.rb', line 9 def connection raise "Must implement connection in subclass." end |
#query(sql) ⇒ Object
13 14 15 |
# File 'lib/dataduck/database.rb', line 13 def query(sql) raise "Must implement query in subclass." end |
#table_names ⇒ Object
17 18 19 |
# File 'lib/dataduck/database.rb', line 17 def table_names raise "Must implement query in subclass." end |