Module: Mumuki::Laboratory::Status::Base
- Included in:
- Aborted, Errored, Failed, ManualEvaluationPending, Passed, PassedWithWarnings, Pending, Running, Unknown
- Defined in:
- lib/mumuki/laboratory/status.rb,
lib/mumuki/laboratory/status/base.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #as_json(_options = {}) ⇒ Object
- #errored? ⇒ Boolean
- #group ⇒ Object
- #iconize ⇒ Object
- #passed? ⇒ Boolean
- #should_retry? ⇒ Boolean
- #to_i ⇒ Object
- #to_mumuki_status ⇒ Object
- #to_s ⇒ Object
- #to_sym ⇒ Object
Instance Method Details
#==(other) ⇒ Object
38 39 40 |
# File 'lib/mumuki/laboratory/status/base.rb', line 38 def ==(other) self.equal? other.to_mumuki_status rescue false end |
#as_json(_options = {}) ⇒ Object
34 35 36 |
# File 'lib/mumuki/laboratory/status/base.rb', line 34 def as_json(={}) to_s end |
#errored? ⇒ Boolean
22 23 24 |
# File 'lib/mumuki/laboratory/status/base.rb', line 22 def errored? false end |
#group ⇒ Object
14 15 16 |
# File 'lib/mumuki/laboratory/status/base.rb', line 14 def group self end |
#iconize ⇒ Object
30 31 32 |
# File 'lib/mumuki/laboratory/status/base.rb', line 30 def iconize group.iconize end |
#passed? ⇒ Boolean
18 19 20 |
# File 'lib/mumuki/laboratory/status/base.rb', line 18 def passed? false end |
#should_retry? ⇒ Boolean
26 27 28 |
# File 'lib/mumuki/laboratory/status/base.rb', line 26 def should_retry? group.should_retry? end |
#to_i ⇒ Object
6 7 8 |
# File 'lib/mumuki/laboratory/status/base.rb', line 6 def to_i Mumuki::Laboratory::Status::STATUSES.index(self) end |
#to_mumuki_status ⇒ Object
58 59 60 |
# File 'lib/mumuki/laboratory/status.rb', line 58 def to_mumuki_status self end |
#to_s ⇒ Object
2 3 4 |
# File 'lib/mumuki/laboratory/status/base.rb', line 2 def to_s name.demodulize.underscore end |
#to_sym ⇒ Object
10 11 12 |
# File 'lib/mumuki/laboratory/status/base.rb', line 10 def to_sym to_s.to_sym end |