Module: Swaggard::Parsers::Type

Defined in:
lib/swaggard/parsers/type.rb

Class Method Summary collapse

Class Method Details

.run(string) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/swaggard/parsers/type.rb', line 6

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