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