-
-
Save guilhermesilveira/84e71f85e843e1c4b41c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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