Class: CityTimeZone::Database

Inherits:
Object
  • Object
show all
Defined in:
lib/city_time_zone/database.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDatabase

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