Class: RedditKit::User

Inherits:
Thing show all
Includes:
Creatable
Defined in:
lib/redditkit/user.rb

Overview

A class representing a reddit user.

Instance Attribute Summary collapse

Attributes inherited from Thing

#id, #kind

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods included from Creatable

#created_at

Methods inherited from Thing

#==, #full_name

Methods inherited from Base

#[], attr_reader, #initialize

Constructor Details

This class inherits a constructor from RedditKit::Base

Instance Attribute Details

#comment_karmaObject (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_mailObject (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_mailObject (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_emailObject (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_friendObject (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_goldObject (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_modObject (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

Returns the value of attribute link_karma.



12
13
14
# File 'lib/redditkit/user.rb', line 12

def link_karma
  @link_karma
end

#nameObject (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_18Object (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

#uriObject



30
31
32
# File 'lib/redditkit/user.rb', line 30

def uri
  @uri ||= URI.join "http://www.reddit.com/user/", username
end