Sha256: e55d526497c0f4f8576823e28a222f2d0a883d24e3c4464c0dc880c1b60e0963

Contents?: true

Size: 654 Bytes

Versions: 15

Compression:

Stored size: 654 Bytes

Contents

require 'pact_broker/client/base_client'

module PactBroker
  module Client
    class Matrix < BaseClient
      class Resource < Hash

        def initialize hash
          self.merge!(hash)
        end

        def any_unknown?
          if supports_unknown_count?
            self[:summary][:unknown] > 0
          else
            false
          end
        end

        def supports_unknown_count?
          !!(self[:summary] && Integer === self[:summary][:unknown] )
        end

        def reason
          self[:summary][:reason]
        end

        def deployable?
          self[:summary][:deployable]
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pact_broker-client-1.25.1 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.25.0 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.24.0 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.23.0 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.22.3 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.22.2 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.22.1 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.21.0 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.20.0 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.19.0 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.18.0 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.17.0 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.16.2 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.16.1 lib/pact_broker/client/matrix/resource.rb
pact_broker-client-1.16.0 lib/pact_broker/client/matrix/resource.rb