Class: TortoiseLabs::Job
- Inherits:
-
Object
- Object
- TortoiseLabs::Job
- Defined in:
- lib/tortoiselabs/vps.rb
Overview
Jobs
Instance Attribute Summary collapse
-
#entry_ts ⇒ Object
readonly
Returns the value of attribute entry_ts.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#start_ts ⇒ Object
readonly
Returns the value of attribute start_ts.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Instance Method Summary collapse
-
#initialize(job) ⇒ Job
constructor
A new instance of Job.
- #success? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(job) ⇒ Job
Returns a new instance of Job.
26 27 28 29 30 31 |
# File 'lib/tortoiselabs/vps.rb', line 26 def initialize(job) @id, @method, @entry_ts, @start_ts = job["id"], job["req_env"]["method"], job["entry_ts"], job["start_ts"] @success = job["rsp_env"]["params"]["success"] end |
Instance Attribute Details
#entry_ts ⇒ Object (readonly)
Returns the value of attribute entry_ts.
24 25 26 |
# File 'lib/tortoiselabs/vps.rb', line 24 def entry_ts @entry_ts end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
24 25 26 |
# File 'lib/tortoiselabs/vps.rb', line 24 def id @id end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
24 25 26 |
# File 'lib/tortoiselabs/vps.rb', line 24 def method @method end |
#start_ts ⇒ Object (readonly)
Returns the value of attribute start_ts.
24 25 26 |
# File 'lib/tortoiselabs/vps.rb', line 24 def start_ts @start_ts end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
24 25 26 |
# File 'lib/tortoiselabs/vps.rb', line 24 def success @success end |
Instance Method Details
#success? ⇒ Boolean
37 38 39 |
# File 'lib/tortoiselabs/vps.rb', line 37 def success? @success end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/tortoiselabs/vps.rb', line 33 def to_s "Job #{@id}: #{@method}" end |