Method: Bake::Type::Any#parse

Defined in:
lib/bake/type/any.rb

#parse(input) ⇒ Object

Parse an input string, trying the listed types in order, returning the first one which doesn’t raise an exception.



35
36
37
38
39
40
41
# File 'lib/bake/type/any.rb', line 35

def parse(input)
  @types.each do |type|
    return type.parse(input)
  rescue
    # Ignore.
  end
end