Class: Twitterize::TwitterDB
- Inherits:
-
Object
- Object
- Twitterize::TwitterDB
- Defined in:
- lib/twitterize.rb
Instance Method Summary collapse
- #connect ⇒ Object
-
#initialize(config_file) ⇒ TwitterDB
constructor
A new instance of TwitterDB.
- #update_feeds ⇒ Object
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
#connect ⇒ Object
101 102 103 |
# File 'lib/twitterize.rb', line 101 def connect ActiveRecord::Base.establish_connection(@config['database']) end |
#update_feeds ⇒ Object
105 106 107 |
# File 'lib/twitterize.rb', line 105 def update_feeds Feed.update_feeds(@config['feeds']) end |