class ShortURL::Services::TinyURL

Public Class Methods

new() click to toggle source
Calls superclass method ShortURL::Service::new
   # File lib/shorturl/services/tinyurl.rb
 7 def initialize
 8   super('tinyurl.com')
 9 
10   @action = "/api-create.php"
11   @method = :get
12 end

Public Instance Methods

on_body(body) click to toggle source
   # File lib/shorturl/services/tinyurl.rb
14 def on_body(body)
15   URI.extract(body).grep(/tinyurl/)[0]
16 end