You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paul Bergeron edited this page May 2, 2013
·
2 revisions
If there is another network call that can be used to fetch the reasource, it's possible to use another Rhod::Command once a failure has occurred.
require'open-uri'require'rhod'yahoo_fallback=Rhod::Command.new(:fallback=>->{""}# couldn't get anything)doopen("https://yahoo.com").readendRhod.create_profile(:google,fallback: ->{yahoo_fallback.execute})Rhod.with_googledoopen("http://google.com").readend