Class: ShortURL::Services::Minilink
- Inherits:
-
ShortURL::Service
- Object
- ShortURL::Service
- ShortURL::Services::Minilink
- Defined in:
- lib/shorturl/services/minilink.rb
Instance Attribute Summary
Attributes inherited from ShortURL::Service
#action, #block, #code, #field, #method, #port, #response_block, #ssl
Instance Method Summary collapse
-
#initialize ⇒ Minilink
constructor
A new instance of Minilink.
- #on_body(body) ⇒ Object
Methods inherited from ShortURL::Service
Constructor Details
#initialize ⇒ Minilink
Returns a new instance of Minilink.
5 6 7 8 9 |
# File 'lib/shorturl/services/minilink.rb', line 5 def initialize super("minilink.org") @method = :get end |
Instance Method Details
#on_body(body) ⇒ Object
11 12 13 |
# File 'lib/shorturl/services/minilink.rb', line 11 def on_body(body) URI.extract(body)[-1] end |