Sha256: a70bb9ae77f2c3e479c5302b97d89ccc2b23a5061a35585aec98c9a272d90c98

Contents?: true

Size: 301 Bytes

Versions: 4

Compression:

Stored size: 301 Bytes

Contents

require_relative '../swagger/type'

module Swaggard
  module Parsers
    module Type
      def self.run(string)
        parts = string.split(/[<>]/)
        name = parts.last
        is_array = parts.grep(/array/i).any?

        Swaggard::Swagger::Type.new(name, is_array)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
swaggard-1.5.1 lib/swaggard/parsers/type.rb
swaggard-1.5.0 lib/swaggard/parsers/type.rb
swaggard-1.4.0 lib/swaggard/parsers/type.rb
swaggard-1.3.0 lib/swaggard/parsers/type.rb