Class: StreamRails::Config
- Inherits:
-
Object
- Object
- StreamRails::Config
- Defined in:
- lib/stream_rails/config.rb
Overview
Class used to initialize configuration object.
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
-
#api_site_id ⇒ Object
Returns the value of attribute api_site_id.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#news_feeds ⇒ Object
Returns the value of attribute news_feeds.
-
#notification_feed ⇒ Object
Returns the value of attribute notification_feed.
-
#user_feed ⇒ Object
Returns the value of attribute user_feed.
Instance Method Summary collapse
- #feed_configs ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
13 14 15 16 17 18 |
# File 'lib/stream_rails/config.rb', line 13 def initialize @enabled = true @news_feeds = {:flat=>'flat', :aggregated=>'aggregated'} @notification_feed = 'notification' @user_feed = 'user' end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/stream_rails/config.rb', line 4 def api_key @api_key end |
#api_secret ⇒ Object
Returns the value of attribute api_secret.
5 6 7 |
# File 'lib/stream_rails/config.rb', line 5 def api_secret @api_secret end |
#api_site_id ⇒ Object
Returns the value of attribute api_site_id.
6 7 8 |
# File 'lib/stream_rails/config.rb', line 6 def api_site_id @api_site_id end |
#enabled ⇒ Object
Returns the value of attribute enabled.
7 8 9 |
# File 'lib/stream_rails/config.rb', line 7 def enabled @enabled end |
#news_feeds ⇒ Object
Returns the value of attribute news_feeds.
9 10 11 |
# File 'lib/stream_rails/config.rb', line 9 def news_feeds @news_feeds end |
#notification_feed ⇒ Object
Returns the value of attribute notification_feed.
10 11 12 |
# File 'lib/stream_rails/config.rb', line 10 def notification_feed @notification_feed end |
#user_feed ⇒ Object
Returns the value of attribute user_feed.
11 12 13 |
# File 'lib/stream_rails/config.rb', line 11 def user_feed @user_feed end |
Instance Method Details
#feed_configs ⇒ Object
20 21 22 23 24 |
# File 'lib/stream_rails/config.rb', line 20 def feed_configs {:news_feeds=>@news_feeds, :notification_feed=>@notification_feed, :user_feed=>@user_feed} end |