Module: BlueFactory::Feeds

Included in:
BlueFactory
Defined in:
lib/blue_factory/modules/feeds.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(target) ⇒ Object



3
4
5
# File 'lib/blue_factory/modules/feeds.rb', line 3

def self.extended(target)
  target.instance_variable_set('@feeds', {})
end

Instance Method Details

#add_feed(key, feed_class) ⇒ Object



7
8
9
10
# File 'lib/blue_factory/modules/feeds.rb', line 7

def add_feed(key, feed_class)
  validate_key(key)
  @feeds[key.to_s] = feed_class
end

#all_feedsObject



20
21
22
# File 'lib/blue_factory/modules/feeds.rb', line 20

def all_feeds
  @feeds.values
end

#feed_keysObject



12
13
14
# File 'lib/blue_factory/modules/feeds.rb', line 12

def feed_keys
  @feeds.keys
end

#get_feed(key) ⇒ Object



16
17
18
# File 'lib/blue_factory/modules/feeds.rb', line 16

def get_feed(key)
  @feeds[key.to_s]
end