Module: A2A::Types

Defined in:
lib/a2a/types.rb

Constant Summary collapse

URI =

Custom URI type that accepts both String and URI objects and ensures the result is always a URI object

Types.Constructor(::URI) do |value|
  case value
  when ::URI
    value
  when String
    ::URI.parse(value)
  else
    raise ArgumentError, "Expected String or URI, got #{value.class}"
  end
end