Class Service
In: lib/shorturl.rb
Parent: Object

Methods

call   new  

Attributes

action  [RW] 
block  [RW] 
code  [RW] 
field  [RW] 
method  [RW] 
port  [RW] 

Public Class methods

Intialize the service with a hostname (required parameter) and you can override the default values for the HTTP port, expected HTTP return code, the form method to use, the form action, the form field which contains the long URL, and the block of what to do with the HTML code you get.

Public Instance methods

Now that our service is set up, call it with all the parameters to (hopefully) return only the shortened URL.

[Validate]