Sha256: 678da777d6c9723ee00bf38800086309aeedd20acaedce8625db3a4b7648b2a9

Contents?: true

Size: 529 Bytes

Versions: 3

Compression:

Stored size: 529 Bytes

Contents

module Mumuki::Laboratory::Status::Base
  def to_s
    name.demodulize.underscore
  end

  def to_i
    Mumuki::Laboratory::Status::STATUSES.index(self)
  end

  def to_sym
    to_s.to_sym
  end

  def group
    self
  end

  def passed?
    false
  end

  def failed?
    false
  end

  def errored?
    false
  end

  def should_retry?
    group.should_retry?
  end

  def iconize
    group.iconize
  end

  def as_json(_options={})
    to_s
  end

  def ==(other)
    self.equal? other.to_mumuki_status rescue false
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mumuki-laboratory-5.3.0 lib/mumuki/laboratory/status/base.rb
mumuki-laboratory-5.2.1 lib/mumuki/laboratory/status/base.rb
mumuki-laboratory-5.2.0 lib/mumuki/laboratory/status/base.rb