class ShortURL::Services::Url
Public Class Methods
new()
click to toggle source
Calls superclass method
ShortURL::Service::new
# File lib/shorturl/services/url.rb 7 def initialize 8 super("url.ca") 9 10 @method = :post 11 @action = "/" 12 @field = "longurl" 13 end
Public Instance Methods
on_body(body)
click to toggle source
# File lib/shorturl/services/url.rb 15 def on_body(body) 16 URI.extract(body).grep(/ur1/)[0] 17 end