Class: StreamRails::Config

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

Overview

Class used to initialize configuration object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_hostnameObject

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_keyObject

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_secretObject

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_idObject

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

#enabledObject

Returns the value of attribute enabled.



9
10
11
# File 'lib/stream_rails/config.rb', line 9

def enabled
  @enabled
end

#locationObject

Returns the value of attribute location.



6
7
8
# File 'lib/stream_rails/config.rb', line 6

def location
  @location
end

#news_feedsObject

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_feedObject

Returns the value of attribute notification_feed.



13
14
15
# File 'lib/stream_rails/config.rb', line 13

def notification_feed
  @notification_feed
end

#timeoutObject

Returns the value of attribute timeout.



10
11
12
# File 'lib/stream_rails/config.rb', line 10

def timeout
  @timeout
end

#user_feedObject

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_configsObject



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