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
66 67 68 |
# File 'lib/dps/dns.rb', line 66 def data @data end |
Instance Method Details
#get_url_part ⇒ Object
87 88 89 |
# File 'lib/dps/dns.rb', line 87 def get_url_part data.find { |d| d =~ /^url=/ } end |
#uri ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/dps/dns.rb', line 74 def uri @uri ||= begin URI(get_url_part.sub(/^url=/, '')) rescue nil end end |
#url ⇒ Object
83 84 85 |
# File 'lib/dps/dns.rb', line 83 def url uri && uri.to_s end |
#valid? ⇒ Boolean
67 68 69 70 71 72 |
# File 'lib/dps/dns.rb', line 67 def valid? uri && uri.query.nil? && uri.fragment.nil? && uri.port == 443 end |