Class: ShortURL::Services::MooURL
- Inherits:
-
ShortURL::Service
- Object
- ShortURL::Service
- ShortURL::Services::MooURL
- Defined in:
- lib/shorturl/services/moourl.rb
Instance Attribute Summary
Attributes inherited from ShortURL::Service
#action, #block, #code, #field, #method, #port, #response_block, #ssl
Instance Method Summary collapse
-
#initialize ⇒ MooURL
constructor
A new instance of MooURL.
- #on_response(response) ⇒ Object
Methods inherited from ShortURL::Service
Constructor Details
#initialize ⇒ MooURL
Returns a new instance of MooURL.
7 8 9 10 11 12 13 14 |
# File 'lib/shorturl/services/moourl.rb', line 7 def initialize super("moourl.com") @code = 302 @method = :get @action = "/create/" @field = "source" end |
Instance Method Details
#on_response(response) ⇒ Object
16 17 18 |
# File 'lib/shorturl/services/moourl.rb', line 16 def on_response(response) "http://moourl.com/" + res["location"].match(/\?moo=/).post_match end |