Class: PublicIp::Service::MatchedExpression
- Extended by:
- Registrable
- Defined in:
- lib/public_ip/service/matched_expression.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#match_regex ⇒ Object
readonly
Returns the value of attribute match_regex.
Attributes inherited from Simple
Class Method Summary collapse
Methods included from Registrable
Methods inherited from Simple
headers, ip, perform_request, symbol, uri
Instance Attribute Details
#match_regex ⇒ Object (readonly)
Returns the value of attribute match_regex.
6 7 8 |
# File 'lib/public_ip/service/matched_expression.rb', line 6 def match_regex @match_regex end |
Class Method Details
.extract_ip(response) ⇒ Object
8 9 10 |
# File 'lib/public_ip/service/matched_expression.rb', line 8 def self.extract_ip(response) response.body.match(match_regex)[1].strip end |