Class: Twitterize::TwitterDB

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

Instance Method Summary collapse

Constructor Details

#initialize(config_file) ⇒ TwitterDB

Returns a new instance of TwitterDB.



96
97
98
99
# File 'lib/twitterize.rb', line 96

def initialize(config_file)
  @config = YAML.load_file(config_file)
  connect
end

Instance Method Details

#connectObject



101
102
103
# File 'lib/twitterize.rb', line 101

def connect
  ActiveRecord::Base.establish_connection(@config['database'])
end

#update_feedsObject



105
106
107
# File 'lib/twitterize.rb', line 105

def update_feeds
  Feed.update_feeds(@config['feeds'])
end