Class: Drone::User
- Inherits:
-
Object
- Object
- Drone::User
- Defined in:
- lib/drone/user.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#admin ⇒ Object
readonly
Returns the value of attribute admin.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#gravatar ⇒ Object
readonly
Returns the value of attribute gravatar.
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
-
#synced_at ⇒ Object
readonly
Returns the value of attribute synced_at.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(remote: nil, login: nil, name: nil, email: nil, gravatar: nil, admin: nil, active: nil, created_at: nil, updated_at: nil, synced_at: nil) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(remote: nil, login: nil, name: nil, email: nil, gravatar: nil, admin: nil, active: nil, created_at: nil, updated_at: nil, synced_at: nil) ⇒ User
Returns a new instance of User.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/drone/user.rb', line 5 def initialize( remote: nil, login: nil, name: nil, email: nil, gravatar: nil, admin: nil, active: nil, created_at: nil, updated_at: nil, synced_at: nil) @remote = remote @login = login @name = name @email = email @gravatar = gravatar @admin = admin @active = active @created_at = created_at @updated_at = updated_at @synced_at = synced_at end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def active @active end |
#admin ⇒ Object (readonly)
Returns the value of attribute admin.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def admin @admin end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def created_at @created_at end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def email @email end |
#gravatar ⇒ Object (readonly)
Returns the value of attribute gravatar.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def gravatar @gravatar end |
#login ⇒ Object (readonly)
Returns the value of attribute login.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def login @login end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def name @name end |
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def remote @remote end |
#synced_at ⇒ Object (readonly)
Returns the value of attribute synced_at.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def synced_at @synced_at end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/drone/user.rb', line 3 def updated_at @updated_at end |
Class Method Details
.build_with_hash(hash) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/drone/user.rb', line 19 def self.build_with_hash(hash) User.new( remote: hash["remote"], login: hash["login"], name: hash["name"], email: hash["email"], gravatar: hash["gravatar"], admin: hash["admin"], active: hash["active"], created_at: hash["created_at"], updated_at: hash["updated_at"], synced_at: hash["synced_at"] ) end |