Class: CityTimeZone::Database
- Inherits:
-
Object
- Object
- CityTimeZone::Database
- Defined in:
- lib/city_time_zone/database.rb
Class Method Summary collapse
Instance Method Summary collapse
- #execute(*args) ⇒ Object
-
#initialize ⇒ Database
constructor
A new instance of Database.
Constructor Details
#initialize ⇒ Database
Returns a new instance of Database.
6 7 8 9 |
# File 'lib/city_time_zone/database.rb', line 6 def initialize @database = SQLite3::Database.new("data/data.db") seed_if_needed! end |
Class Method Details
.seed! ⇒ Object
15 16 17 18 |
# File 'lib/city_time_zone/database.rb', line 15 def self.seed! database = self.new database.send :seed! end |
Instance Method Details
#execute(*args) ⇒ Object
11 12 13 |
# File 'lib/city_time_zone/database.rb', line 11 def execute(*args) @database.execute(*args) end |