Sha256: d93e7cde1f4826f774d8b9d9684a881184e710363d48ff9542bebc686e2a4213

Contents?: true

Size: 481 Bytes

Versions: 15

Compression:

Stored size: 481 Bytes

Contents

module ServiceContract
  class AbstractService
    class << self
      def all
        []
      end

      def find(version)
        all.detect{|definition| definition.version == version.to_s}
      end
    end

    attr_reader :version
    def initialize(version)
      @version = version.to_s
    end

    # returns an array of AbstractProtocol
    def protocols
      []
    end

    def protocol(name)
      protocols.detect{|protocol| protocol.name == name}
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
service_contract-0.6.0 lib/service_contract/abstract_service.rb
service_contract-0.5.1 lib/service_contract/abstract_service.rb
service_contract-0.5.0 lib/service_contract/abstract_service.rb
service_contract-0.4.1 lib/service_contract/abstract_service.rb
service_contract-0.4.0 lib/service_contract/abstract_service.rb
service_contract-0.3.0 lib/service_contract/abstract_service.rb
service_contract-0.2.1 lib/service_contract/abstract_service.rb
service_contract-0.2.0 lib/service_contract/abstract_service.rb
service_contract-0.1.1 lib/service_contract/abstract_service.rb
service_contract-0.1.0 lib/service_contract/abstract_service.rb
service_contract-0.0.10 lib/service_contract/abstract_service.rb
service_contract-0.0.8 lib/service_contract/abstract_service.rb
service_contract-0.0.7 lib/service_contract/abstract_service.rb
service_contract-0.0.6 lib/service_contract/abstract_service.rb
service_contract-0.0.5 lib/service_contract/abstract_service.rb