Class: Dev::TargetProcess::User
- Defined in:
- lib/firespring_dev_commands/target_process/user.rb
Overview
Class containing user information
Constant Summary collapse
- RESOURCE_TYPE =
The resource type for the api endpoint
'User'.freeze
- PATH =
The api path for user requests
'/User'.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#login ⇒ Object
Returns the value of attribute login.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
-
.get(id) ⇒ Object
Get the user with the given id and return that object.
Instance Method Summary collapse
-
#initialize(data) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(data) ⇒ User
Returns a new instance of User.
13 14 15 16 17 18 19 20 |
# File 'lib/firespring_dev_commands/target_process/user.rb', line 13 def initialize(data) @data = data @id = data['Id'] @type = data['ResourceType'] @name = data['FullName'] @login = data['Login'] @email = data['Email'] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
11 12 13 |
# File 'lib/firespring_dev_commands/target_process/user.rb', line 11 def data @data end |
#email ⇒ Object
Returns the value of attribute email.
11 12 13 |
# File 'lib/firespring_dev_commands/target_process/user.rb', line 11 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
11 12 13 |
# File 'lib/firespring_dev_commands/target_process/user.rb', line 11 def id @id end |
#login ⇒ Object
Returns the value of attribute login.
11 12 13 |
# File 'lib/firespring_dev_commands/target_process/user.rb', line 11 def login @login end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/firespring_dev_commands/target_process/user.rb', line 11 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
11 12 13 |
# File 'lib/firespring_dev_commands/target_process/user.rb', line 11 def type @type end |