Sha256: 8bb2544540099b60ff43fc9cf347758c68af36bed3e27e93596cfa54f758955c

Contents?: true

Size: 451 Bytes

Versions: 7

Compression:

Stored size: 451 Bytes

Contents

module ServiceContract
  module Avro
    class Parameter < AbstractParameter
      def name
        definition.name
      end

      def type
        Type.build(definition.type)
      end

      def subtype
        definition.array? ?
          definition.type.items :
          nil
      end

      def default
        definition.default
      end

      def doc
        definition.respond_to?(:doc) ? definition.doc : nil
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
service_contract-0.3.0 lib/service_contract/avro/parameter.rb
service_contract-0.2.1 lib/service_contract/avro/parameter.rb
service_contract-0.2.0 lib/service_contract/avro/parameter.rb
service_contract-0.1.1 lib/service_contract/avro/parameter.rb
service_contract-0.1.0 lib/service_contract/avro/parameter.rb
service_contract-0.0.10 lib/service_contract/avro/parameter.rb
service_contract-0.0.8 lib/service_contract/avro/parameter.rb