Sha256: 8c1abbee3027c122a9c6ec12c8501abf9183dd660a71f206a94133db672c746e

Contents?: true

Size: 871 Bytes

Versions: 15

Compression:

Stored size: 871 Bytes

Contents

module ServiceContract
  module Avro
    class Service < AbstractService
      class << self
        def all
          @all ||= begin
            Dir.glob(File.join(data_dir, "*")).map do |filepath|
              new(File.basename(filepath).to_s)
            end
          end
        end

        def data_dir
          raise :not_implemented
        end

        def title
          "Avro Service"
        end

        def description
          ""
        end

      end

      def protocols
        @protocols ||= begin
          Dir.glob(File.join(data_dir, "*.avpr")).map do |filepath|
            name = File.basename(filepath, ".avpr")
            Protocol.new(name, self)
          end
        end
      end

      def path
        "/#{version}"
      end

      def data_dir
        File.join(self.class.data_dir, version, "compiled")
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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