Class: GLPL::Job
- Inherits:
-
Object
- Object
- GLPL::Job
- Defined in:
- lib/glpl/job.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#stage ⇒ Object
readonly
Returns the value of attribute stage.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(job_data) ⇒ Job
constructor
A new instance of Job.
Constructor Details
#initialize(job_data) ⇒ Job
Returns a new instance of Job.
7 8 9 10 11 12 13 14 15 |
# File 'lib/glpl/job.rb', line 7 def initialize(job_data) @id = job_data["id"] @status = job_data["status"] @stage = job_data["stage"] @name = job_data["name"] @ref = job_data["ref"] @created_at = DateTime.parse(job_data["created_at"]) @username = job_data["username"] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/glpl/job.rb', line 5 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/glpl/job.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/glpl/job.rb', line 5 def name @name end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
5 6 7 |
# File 'lib/glpl/job.rb', line 5 def ref @ref end |
#stage ⇒ Object (readonly)
Returns the value of attribute stage.
5 6 7 |
# File 'lib/glpl/job.rb', line 5 def stage @stage end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/glpl/job.rb', line 5 def status @status end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
5 6 7 |
# File 'lib/glpl/job.rb', line 5 def username @username end |