Class: Logan::Person
- Inherits:
-
Object
- Object
- Logan::Person
- Includes:
- HashConstructed, ResponseHandler
- Defined in:
- lib/logan/person.rb
Instance Attribute Summary collapse
-
#admin ⇒ Object
Returns the value of attribute admin.
-
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#email_address ⇒ Object
Returns the value of attribute email_address.
-
#id ⇒ Object
Returns the value of attribute id.
-
#identity_id ⇒ Object
Returns the value of attribute identity_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes included from HashConstructed
Instance Method Summary collapse
Methods included from ResponseHandler
#handle_error, #handle_response, #success?
Methods included from HashConstructed
Instance Attribute Details
#admin ⇒ Object
Returns the value of attribute admin.
13 14 15 |
# File 'lib/logan/person.rb', line 13 def admin @admin end |
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
14 15 16 |
# File 'lib/logan/person.rb', line 14 def avatar_url @avatar_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
15 16 17 |
# File 'lib/logan/person.rb', line 15 def created_at @created_at end |
#email_address ⇒ Object
Returns the value of attribute email_address.
12 13 14 |
# File 'lib/logan/person.rb', line 12 def email_address @email_address end |
#id ⇒ Object
Returns the value of attribute id.
9 10 11 |
# File 'lib/logan/person.rb', line 9 def id @id end |
#identity_id ⇒ Object
Returns the value of attribute identity_id.
10 11 12 |
# File 'lib/logan/person.rb', line 10 def identity_id @identity_id end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/logan/person.rb', line 11 def name @name end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
16 17 18 |
# File 'lib/logan/person.rb', line 16 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
17 18 19 |
# File 'lib/logan/person.rb', line 17 def url @url end |
Instance Method Details
#projects ⇒ Object
23 24 25 26 |
# File 'lib/logan/person.rb', line 23 def projects response = Logan::Client.get "/people/#{@id}/projects.json" handle_response(response, Proc.new {|h| Logan::Project.new(h) }) end |
#to_hash ⇒ Object
19 20 21 |
# File 'lib/logan/person.rb', line 19 def to_hash { :id => @id, :type => "Person" } end |