Sha256: 3fb7fe89a18614e91bbb5837214d45eda988698640ba6424d5b24d91e9afe9c5

Contents?: true

Size: 361 Bytes

Versions: 3

Compression:

Stored size: 361 Bytes

Contents

module Pact
  module Consumer
    class ServiceConsumer
      attr_accessor :name
      def initialize options
        @name = options[:name]
      end

      def to_s
        name
      end

      def as_json options = {}
        {name: name}
      end

      def self.from_hash obj
        ServiceConsumer.new(:name => obj['name'])
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pact-0.1.37 lib/pact/consumer/service_consumer.rb
pact-0.1.35 lib/pact/consumer/service_consumer.rb
pact-0.1.28 lib/pact/consumer/service_consumer.rb