Skip to content

Instantly share code, notes, and snippets.

@guilhermesilveira
Created June 9, 2010 00:48
Show Gist options
  • Select an option

  • Save guilhermesilveira/84e71f85e843e1c4b41c to your computer and use it in GitHub Desktop.

Select an option

Save guilhermesilveira/84e71f85e843e1c4b41c to your computer and use it in GitHub Desktop.
class BuyingProcess < Restfulie::Client::Mikyung::RestProcessModel
at "http://localhost:3000/items"
accept "application/xml"
current_dir File.dirname(__FILE__)
def initialize(*what)
@what = what
end
def completed?(resource)
resource.keys.first == "payment"
end
def self.run
# Restfulie::Common::Logger.logger.level = Logger::DEBUG
goal = BuyingProcess.new("Rest", "Calpis")
result = Restfulie::Mikyung.new.achieve(goal).run
puts "Goal Achieved"
puts result.response.body
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment