Class: Scrapbooker::Services::TwitterFeed
- Inherits:
-
Object
- Object
- Scrapbooker::Services::TwitterFeed
- Defined in:
- lib/scrapbooker/services/twitter_feed.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#exclude_replies ⇒ Object
readonly
Returns the value of attribute exclude_replies.
-
#include_entities ⇒ Object
readonly
Returns the value of attribute include_entities.
-
#include_retweets ⇒ Object
readonly
Returns the value of attribute include_retweets.
-
#trim_user ⇒ Object
readonly
Returns the value of attribute trim_user.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ TwitterFeed
constructor
A new instance of TwitterFeed.
Constructor Details
#initialize(options) ⇒ TwitterFeed
Returns a new instance of TwitterFeed.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 20 def initialize() @active = ? true : false ||= {} = self.class..merge() @username = [:username] @include_retweets = [:include_retweets] @exclude_replies = [:exclude_replies] @include_entities = [:include_entities] @count = [:count] @trim_user = [:trim_user] end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
18 19 20 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 18 def active @active end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
18 19 20 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 18 def count @count end |
#exclude_replies ⇒ Object (readonly)
Returns the value of attribute exclude_replies.
18 19 20 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 18 def exclude_replies @exclude_replies end |
#include_entities ⇒ Object (readonly)
Returns the value of attribute include_entities.
18 19 20 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 18 def include_entities @include_entities end |
#include_retweets ⇒ Object (readonly)
Returns the value of attribute include_retweets.
18 19 20 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 18 def include_retweets @include_retweets end |
#trim_user ⇒ Object (readonly)
Returns the value of attribute trim_user.
18 19 20 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 18 def trim_user @trim_user end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
18 19 20 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 18 def username @username end |
Class Method Details
.default_options ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/scrapbooker/services/twitter_feed.rb', line 7 def self. @default_options ||= { :username => nil, :include_retweets => true, :exclude_replies => true, :include_entities => true, :count => 20, :trim_user => true } end |