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.



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_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.



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

def api_site_id
  @api_site_id
end

#enabledObject

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#news_feedsObject

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_feedObject

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_feedObject

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_configsObject



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