Class: Dps::DNS::Endpoint
- Inherits:
-
Struct
- Object
- Struct
- Dps::DNS::Endpoint
- Defined in:
- lib/dps/dns.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
76 77 78 |
# File 'lib/dps/dns.rb', line 76 def data @data end |
Instance Method Details
#get_url_part ⇒ Object
97 98 99 |
# File 'lib/dps/dns.rb', line 97 def get_url_part data.find { |d| d =~ /^url=/ } end |
#uri ⇒ Object
84 85 86 87 88 89 90 91 |
# File 'lib/dps/dns.rb', line 84 def uri @uri ||= begin URI(get_url_part.sub(/^url=/, '')) rescue nil end end |
#url ⇒ Object
93 94 95 |
# File 'lib/dps/dns.rb', line 93 def url uri && uri.to_s end |
#valid? ⇒ Boolean
77 78 79 80 81 82 |
# File 'lib/dps/dns.rb', line 77 def valid? uri && uri.query.nil? && uri.fragment.nil? && uri.port == 443 end |