Created
November 16, 2009 19:04
-
-
Save tdreyno/236218 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 Sinatra::Base | |
| # not my code | |
| def self.get(url, *args) | |
| # method body | |
| end | |
| # my code | |
| def self.with_layout(url, layout, &block) | |
| # Basically, I want to call get, but with additional args appended | |
| Generic.class_eval(&block) | |
| end | |
| end | |
| class Generic | |
| def self.get(url) | |
| Sinatra::Base.get(url, { :layout => "whatever" }) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment