Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class Blog < ActionWebService::Struct member :blogid, :string member :blogName, :string member :url, :string end class BloggerApi < ActionWebService::API::Base inflect_names false api_method :getUsersBlogs, :expects => [ {:appkey => :string}, {:username => :string}, {:password => :string} ], :returns => [[Blog]] end class BloggerService < ActionWebService::Base web_service_api BloggerApi attr_accessor :controller def initialize(controller) @controller = controller end def getUsersBlogs(appkey, email, password) @author = get_author(email, password) [Blog.new( :url => controller.url_for(:author=>@author, :controller=>'blog'), :blogid => 1, :blogName => @author.short_name.capitalize + "'s Blog" )] end def get_author(email, password) Author.login(email, password) end end
This paste will be private.
From the Design Piracy series on my blog: