Class: Tweethook::Result
- Inherits:
-
Object
- Object
- Tweethook::Result
- Defined in:
- lib/tweethook/result.rb
Instance Attribute Summary collapse
-
#is_reply ⇒ Object
Returns the value of attribute is_reply.
-
#is_retweet ⇒ Object
Returns the value of attribute is_retweet.
-
#mentions ⇒ Object
Returns the value of attribute mentions.
-
#search_query ⇒ Object
Returns the value of attribute search_query.
-
#source ⇒ Object
Returns the value of attribute source.
-
#sourcelink ⇒ Object
Returns the value of attribute sourcelink.
-
#tid ⇒ Object
Returns the value of attribute tid.
-
#tstamp ⇒ Object
Returns the value of attribute tstamp.
-
#tweet ⇒ Object
Returns the value of attribute tweet.
-
#unix_tstamp ⇒ Object
Returns the value of attribute unix_tstamp.
-
#user ⇒ Object
Returns the value of attribute user.
-
#usrimg ⇒ Object
Returns the value of attribute usrimg.
Instance Method Summary collapse
- #change_boolean_values ⇒ Object
-
#initialize(args) ⇒ Result
constructor
A new instance of Result.
- #reply? ⇒ Boolean
- #retweet? ⇒ Boolean
Constructor Details
#initialize(args) ⇒ Result
Returns a new instance of Result.
5 6 7 8 |
# File 'lib/tweethook/result.rb', line 5 def initialize(args) args.each { |key,value| instance_variable_set("@#{key}",value) } change_boolean_values end |
Instance Attribute Details
#is_reply ⇒ Object
Returns the value of attribute is_reply.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def is_reply @is_reply end |
#is_retweet ⇒ Object
Returns the value of attribute is_retweet.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def is_retweet @is_retweet end |
#mentions ⇒ Object
Returns the value of attribute mentions.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def mentions @mentions end |
#search_query ⇒ Object
Returns the value of attribute search_query.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def search_query @search_query end |
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def source @source end |
#sourcelink ⇒ Object
Returns the value of attribute sourcelink.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def sourcelink @sourcelink end |
#tid ⇒ Object
Returns the value of attribute tid.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def tid @tid end |
#tstamp ⇒ Object
Returns the value of attribute tstamp.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def tstamp @tstamp end |
#tweet ⇒ Object
Returns the value of attribute tweet.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def tweet @tweet end |
#unix_tstamp ⇒ Object
Returns the value of attribute unix_tstamp.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def unix_tstamp @unix_tstamp end |
#user ⇒ Object
Returns the value of attribute user.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def user @user end |
#usrimg ⇒ Object
Returns the value of attribute usrimg.
3 4 5 |
# File 'lib/tweethook/result.rb', line 3 def usrimg @usrimg end |
Instance Method Details
#change_boolean_values ⇒ Object
10 11 12 13 |
# File 'lib/tweethook/result.rb', line 10 def change_boolean_values @is_reply = !@is_reply.zero? @is_retweet = !@is_retweet.zero? end |
#reply? ⇒ Boolean
15 16 17 |
# File 'lib/tweethook/result.rb', line 15 def reply? @is_reply end |
#retweet? ⇒ Boolean
19 20 21 |
# File 'lib/tweethook/result.rb', line 19 def retweet? @is_retweet end |