Class: Redd::Object::User

Inherits:
Thing show all
Includes:
Thing::Messageable
Defined in:
lib/redd/object/user.rb

Instance Attribute Summary collapse

Attributes inherited from Thing

#id, #kind

Attributes inherited from Base

#attributes, #client

Instance Method Summary collapse

Methods included from Thing::Messageable

#send_message

Methods inherited from Thing

#==

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, #initialize

Constructor Details

This class inherits a constructor from Redd::Base

Instance Attribute Details

#comment_karmaObject (readonly)

Returns the value of attribute comment_karma.



13
14
15
# File 'lib/redd/object/user.rb', line 13

def comment_karma
  @comment_karma
end

#gold_credditsObject (readonly)

Returns the value of attribute gold_creddits.



14
15
16
# File 'lib/redd/object/user.rb', line 14

def gold_creddits
  @gold_creddits
end

#gold_expirationObject (readonly)

Returns the value of attribute gold_expiration.



15
16
17
# File 'lib/redd/object/user.rb', line 15

def gold_expiration
  @gold_expiration
end

#has_mailObject (readonly)

Returns the value of attribute has_mail.



20
21
22
# File 'lib/redd/object/user.rb', line 20

def has_mail
  @has_mail
end

#has_mod_mailObject (readonly)

Returns the value of attribute has_mod_mail.



19
20
21
# File 'lib/redd/object/user.rb', line 19

def has_mod_mail
  @has_mod_mail
end

#has_verified_emailObject (readonly)

Returns the value of attribute has_verified_email.



18
19
20
# File 'lib/redd/object/user.rb', line 18

def has_verified_email
  @has_verified_email
end

#is_friendObject (readonly)

Returns the value of attribute is_friend.



11
12
13
# File 'lib/redd/object/user.rb', line 11

def is_friend
  @is_friend
end

#is_goldObject (readonly) Also known as: has_gold

Returns the value of attribute is_gold.



16
17
18
# File 'lib/redd/object/user.rb', line 16

def is_gold
  @is_gold
end

#is_modObject (readonly)

Returns the value of attribute is_mod.



17
18
19
# File 'lib/redd/object/user.rb', line 17

def is_mod
  @is_mod
end

Returns the value of attribute link_karma.



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

def link_karma
  @link_karma
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/redd/object/user.rb', line 10

def name
  @name
end

Instance Method Details

#createdObject



24
25
26
# File 'lib/redd/object/user.rb', line 24

def created
  @created ||= Time.at(@attributes[:created_utc])
end

#fullnameObject



28
29
30
# File 'lib/redd/object/user.rb', line 28

def fullname
  @fullname ||= "#{kind}_#{id}"
end