Class: Twitter::Tweet
Instance Attribute Summary collapse
Attributes inherited from Identity
#id
Attributes inherited from Base
#attrs
Instance Method Summary
collapse
Methods included from Entities
#entities?, #hashtags, #hashtags?, #media, #media?, #symbols, #symbols?, #uris, #uris?, #user_mentions, #user_mentions?
Methods included from Creatable
#created?, #created_at
Methods inherited from Identity
#initialize
Methods inherited from Base
#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, deprecate_attribute_method, display_uri_attr_reader, #initialize, object_attr_reader, predicate_attr_reader, uri_attr_reader
Methods included from Utils
flat_pmap, pmap
Instance Attribute Details
#favorite_count ⇒ Integer
12
13
14
|
# File 'lib/twitter/tweet.rb', line 12
def favorite_count
@favorite_count
end
|
#filter_level ⇒ String
10
11
12
|
# File 'lib/twitter/tweet.rb', line 10
def filter_level
@filter_level
end
|
#in_reply_to_screen_name ⇒ String
10
11
12
|
# File 'lib/twitter/tweet.rb', line 10
def in_reply_to_screen_name
@in_reply_to_screen_name
end
|
#in_reply_to_status_id ⇒ Integer
Also known as:
12
13
14
|
# File 'lib/twitter/tweet.rb', line 12
def in_reply_to_status_id
@in_reply_to_status_id
end
|
#in_reply_to_user_id ⇒ Integer
12
13
14
|
# File 'lib/twitter/tweet.rb', line 12
def in_reply_to_user_id
@in_reply_to_user_id
end
|
#lang ⇒ String
10
11
12
|
# File 'lib/twitter/tweet.rb', line 10
def lang
@lang
end
|
12
13
14
|
# File 'lib/twitter/tweet.rb', line 12
def
@retweet_count
end
|
#source ⇒ String
10
11
12
|
# File 'lib/twitter/tweet.rb', line 10
def source
@source
end
|
#text ⇒ String
10
11
12
|
# File 'lib/twitter/tweet.rb', line 10
def text
@text
end
|
Instance Method Details
#full_text ⇒ String
36
37
38
39
40
41
42
43
|
# File 'lib/twitter/tweet.rb', line 36
def full_text
if
prefix = text[/\A(RT @[a-z0-9_]{1,20}: )/i, 1]
[prefix, .text].compact.join
else
text
end
end
|
#uri ⇒ Addressable::URI
Also known as:
url
Returns The URL to the tweet.
47
48
49
|
# File 'lib/twitter/tweet.rb', line 47
def uri
Addressable::URI.parse("https://twitter.com/#{user.screen_name}/status/#{id}") if user?
end
|