Class: RedditKit::User
- Includes:
- Creatable
- Defined in:
- lib/redditkit/user.rb
Overview
A class representing a reddit user.
Instance Attribute Summary collapse
-
#comment_karma ⇒ Object
readonly
Returns the value of attribute comment_karma.
-
#has_mail ⇒ Object
(also: #mail?)
readonly
Returns the value of attribute has_mail.
-
#has_mod_mail ⇒ Object
(also: #mod_mail?)
readonly
Returns the value of attribute has_mod_mail.
-
#has_verified_email ⇒ Object
(also: #verified?)
readonly
Returns the value of attribute has_verified_email.
-
#is_friend ⇒ Object
(also: #friend?)
readonly
Returns the value of attribute is_friend.
-
#is_gold ⇒ Object
(also: #gold?)
readonly
Returns the value of attribute is_gold.
-
#is_mod ⇒ Object
(also: #mod?)
readonly
Returns the value of attribute is_mod.
-
#link_karma ⇒ Object
readonly
Returns the value of attribute link_karma.
-
#name ⇒ Object
(also: #username)
readonly
Returns the value of attribute name.
-
#over_18 ⇒ Object
(also: #over_18?)
readonly
Returns the value of attribute over_18.
Attributes inherited from Thing
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Creatable
Methods inherited from Thing
Methods inherited from Base
Constructor Details
This class inherits a constructor from RedditKit::Base
Instance Attribute Details
#comment_karma ⇒ Object (readonly)
Returns the value of attribute comment_karma.
11 12 13 |
# File 'lib/redditkit/user.rb', line 11 def comment_karma @comment_karma end |
#has_mail ⇒ Object (readonly) Also known as: mail?
Returns the value of attribute has_mail.
13 14 15 |
# File 'lib/redditkit/user.rb', line 13 def has_mail @has_mail end |
#has_mod_mail ⇒ Object (readonly) Also known as: mod_mail?
Returns the value of attribute has_mod_mail.
14 15 16 |
# File 'lib/redditkit/user.rb', line 14 def has_mod_mail @has_mod_mail end |
#has_verified_email ⇒ Object (readonly) Also known as: verified?
Returns the value of attribute has_verified_email.
15 16 17 |
# File 'lib/redditkit/user.rb', line 15 def has_verified_email @has_verified_email end |
#is_friend ⇒ Object (readonly) Also known as: friend?
Returns the value of attribute is_friend.
17 18 19 |
# File 'lib/redditkit/user.rb', line 17 def is_friend @is_friend end |
#is_gold ⇒ Object (readonly) Also known as: gold?
Returns the value of attribute is_gold.
16 17 18 |
# File 'lib/redditkit/user.rb', line 16 def is_gold @is_gold end |
#is_mod ⇒ Object (readonly) Also known as: mod?
Returns the value of attribute is_mod.
18 19 20 |
# File 'lib/redditkit/user.rb', line 18 def is_mod @is_mod end |
#link_karma ⇒ Object (readonly)
Returns the value of attribute link_karma.
12 13 14 |
# File 'lib/redditkit/user.rb', line 12 def link_karma @link_karma end |
#name ⇒ Object (readonly) Also known as: username
Returns the value of attribute name.
10 11 12 |
# File 'lib/redditkit/user.rb', line 10 def name @name end |
#over_18 ⇒ Object (readonly) Also known as: over_18?
Returns the value of attribute over_18.
19 20 21 |
# File 'lib/redditkit/user.rb', line 19 def over_18 @over_18 end |
Instance Method Details
#uri ⇒ Object
30 31 32 |
# File 'lib/redditkit/user.rb', line 30 def uri @uri ||= URI.join "http://www.reddit.com/user/", username end |