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

#append_help_messages, #default_protocol, #validate

Methods inherited from OptBase

#advanced?, #alias?, #append_help_messages, #choices, #default, #help_message_for_default, #help_messages, #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



7
8
9
# File 'lib/opt_parse_validator/opts/url.rb', line 7

def allowed_protocols
  %w[http https]
end