class PactBroker::Client::Matrix::Resource

Public Class Methods

new(hash) click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 21
def initialize hash
  self.merge!(hash)
end

Public Instance Methods

any_unknown?() click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 25
def any_unknown?
  if supports_unknown_count?
    unknown_count > 0
  else
    false
  end
end
deployable?() click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 53
def deployable?
  self[:summary][:deployable]
end
no_results?() click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 33
def no_results?
  self[:summary][:success] == 0 && self[:summary][:failed] == 0
end
notices() click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 57
def notices
  if self[:notices].is_a?(Array)
    self[:notices].collect { | notice_hash | Notice.new(notice_hash) }
  else
    nil
  end
end
reason() click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 49
def reason
  self[:summary][:reason]
end
supports_ignore?() click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 41
def supports_ignore?
  !!(self[:summary] && Integer === self[:summary][:ignored] )
end
supports_unknown_count?() click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 37
def supports_unknown_count?
  !!(self[:summary] && Integer === self[:summary][:unknown] )
end
unknown_count() click to toggle source
# File lib/pact_broker/client/matrix/resource.rb, line 45
def unknown_count
  supports_unknown_count? ? self[:summary][:unknown] : nil
end