Class: Githubris::User
- Inherits:
-
Object
- Object
- Githubris::User
- Defined in:
- lib/githubris/user.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #avatar_url ⇒ Object
- #gravatar_id ⇒ Object
- #id ⇒ Object
-
#initialize(attributes = {}) ⇒ User
constructor
A new instance of User.
- #login ⇒ Object
- #public_gists ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ User
Returns a new instance of User.
2 3 4 |
# File 'lib/githubris/user.rb', line 2 def initialize attributes={} @attributes = attributes end |
Instance Method Details
#==(other) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/githubris/user.rb', line 30 def == other other_attrs = other.instance_variable_get(:@attributes) if other_attrs @attributes == other_attrs end end |
#avatar_url ⇒ Object
18 19 20 |
# File 'lib/githubris/user.rb', line 18 def avatar_url @attributes[:avatar_url] end |
#gravatar_id ⇒ Object
26 27 28 |
# File 'lib/githubris/user.rb', line 26 def gravatar_id @attributes[:gravatar_id] end |
#id ⇒ Object
14 15 16 |
# File 'lib/githubris/user.rb', line 14 def id @attributes[:id] end |
#login ⇒ Object
10 11 12 |
# File 'lib/githubris/user.rb', line 10 def login @attributes[:login] end |
#public_gists ⇒ Object
6 7 8 |
# File 'lib/githubris/user.rb', line 6 def public_gists Githubris::API.new.get_user_public_gists(@attributes[:login]) end |
#url ⇒ Object
22 23 24 |
# File 'lib/githubris/user.rb', line 22 def url @attributes[:url] end |