Class: OptParseValidator::OptURL

Inherits:
OptURI show all
Defined in:
lib/opt_parse_validator/opts/url.rb

Overview

Implementation of the URL Option

Instance Attribute Summary

Attributes inherited from OptBase

#attrs, #option, #required

Instance Method Summary collapse

Methods inherited from OptURI

#default_protocol, #validate

Methods inherited from OptBase

#choices, #default, #initialize, #normalize, #required?, #required_unless, #to_long, #to_s, #to_sym, #validate, #value_if_empty

Constructor Details

This class inherits a constructor from OptParseValidator::OptBase

Instance Method Details

#allowed_protocolsArray

Returns The allowed protocols.

Returns:

  • (Array)

    The allowed protocols



5
6
7
# File 'lib/opt_parse_validator/opts/url.rb', line 5

def allowed_protocols
  %w(http https)
end