Class: Opto::Types::Uri
- Inherits:
-
Opto::Type
- Object
- Opto::Type
- Opto::Types::Uri
- Defined in:
- lib/opto/types/uri.rb
Overview
An uri/url.
Options:
schemes: an array of allowed schemes, such as ['http', 'https', 'file']
Constant Summary
Constants inherited from Opto::Type
Instance Attribute Summary
Attributes inherited from Opto::Type
Instance Method Summary collapse
Methods inherited from Opto::Type
#errors, for, inherited, #initialize, #required?, #sanitize, sanitizer, sanitizers, true_when, #type, type, types, #valid?, #validate, validator, validators
Constructor Details
This class inherits a constructor from Opto::Type
Instance Method Details
#uri(value) ⇒ Object
30 31 32 |
# File 'lib/opto/types/uri.rb', line 30 def uri(value) URI.parse(value) end |