Class: AlexaRuby::URI
- Inherits:
-
Object
- Object
- AlexaRuby::URI
- Defined in:
- lib/alexa_ruby/request/base_request/validator/uri.rb
Overview
URI request validator
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(uri) ⇒ URI
constructor
Setup new URI.
-
#valid? ⇒ Boolean
Check if it is a valid Amazon URI.
Constructor Details
#initialize(uri) ⇒ URI
Setup new URI
9 10 11 |
# File 'lib/alexa_ruby/request/base_request/validator/uri.rb', line 9 def initialize(uri) @uri = Addressable::URI.parse(uri).normalize! end |
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/validator/uri.rb', line 4 def uri @uri end |
Instance Method Details
#valid? ⇒ Boolean
Check if it is a valid Amazon URI
16 17 18 |
# File 'lib/alexa_ruby/request/base_request/validator/uri.rb', line 16 def valid? https? && amazon? && echo_api? && port? end |