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_hostname ⇒ Object
Returns the value of attribute api_hostname.
-
#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.
-
#location ⇒ Object
Returns the value of attribute location.
-
#news_feeds ⇒ Object
Returns the value of attribute news_feeds.
-
#notification_feed ⇒ Object
Returns the value of attribute notification_feed.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#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.
16 17 18 19 20 21 22 |
# File 'lib/stream_rails/config.rb', line 16 def initialize @enabled = true @news_feeds = { timeline: 'timeline', timeline_aggregated: 'timeline_aggregated' } @notification_feed = 'notification' @user_feed = 'user' @timeout = 3 end |
Instance Attribute Details
#api_hostname ⇒ Object
Returns the value of attribute api_hostname.
7 8 9 |
# File 'lib/stream_rails/config.rb', line 7 def api_hostname @api_hostname end |
#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.
8 9 10 |
# File 'lib/stream_rails/config.rb', line 8 def api_site_id @api_site_id end |
#enabled ⇒ Object
Returns the value of attribute enabled.
9 10 11 |
# File 'lib/stream_rails/config.rb', line 9 def enabled @enabled end |
#location ⇒ Object
Returns the value of attribute location.
6 7 8 |
# File 'lib/stream_rails/config.rb', line 6 def location @location end |
#news_feeds ⇒ Object
Returns the value of attribute news_feeds.
12 13 14 |
# File 'lib/stream_rails/config.rb', line 12 def news_feeds @news_feeds end |
#notification_feed ⇒ Object
Returns the value of attribute notification_feed.
13 14 15 |
# File 'lib/stream_rails/config.rb', line 13 def notification_feed @notification_feed end |
#timeout ⇒ Object
Returns the value of attribute timeout.
10 11 12 |
# File 'lib/stream_rails/config.rb', line 10 def timeout @timeout end |
#user_feed ⇒ Object
Returns the value of attribute user_feed.
14 15 16 |
# File 'lib/stream_rails/config.rb', line 14 def user_feed @user_feed end |
Instance Method Details
#feed_configs ⇒ Object
24 25 26 27 28 |
# File 'lib/stream_rails/config.rb', line 24 def feed_configs { news_feeds: @news_feeds, notification_feed: @notification_feed, user_feed: @user_feed } end |