Class: ShortURL::Services::Minilink

Inherits:
ShortURL::Service show all
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

Methods inherited from ShortURL::Service

#call, #on_response

Constructor Details

#initializeMinilink

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