Sha256: 6d2691ce2067f19af91f6c8a95d81ebbb17091b3c353d157dd1502d113833dfa

Contents?: true

Size: 367 Bytes

Versions: 6

Compression:

Stored size: 367 Bytes

Contents

require 'sequel'

module PactBroker

  module Models

    class Pacticipant < Sequel::Model

      set_primary_key :id

      one_to_many :versions, :order => :order, :reciprocal => :pacticipant
      one_to_many :pacts

      def latest_version
        versions.last
      end

      def to_s
        "Pacticipant: id=#{id}, name=#{name}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pact_broker-1.0.0 lib/pact_broker/models/pacticipant.rb
pact_broker-1.0.0.alpha3 lib/pact_broker/models/pacticipant.rb
pact_broker-1.0.0.alpha2 lib/pact_broker/models/pacticipant.rb
pact_broker-1.0.0.alpha1 lib/pact_broker/models/pacticipant.rb
pact_broker-0.0.10 lib/pact_broker/models/pacticipant.rb
pact_broker-0.0.9 lib/pact_broker/models/pacticipant.rb