Skip to content

Instantly share code, notes, and snippets.

@dyoder
Created July 28, 2008 02:15
Show Gist options
  • Save dyoder/2829 to your computer and use it in GitHub Desktop.
Save dyoder/2829 to your computer and use it in GitHub Desktop.
lambda {
string_or_symbol = lambda { |arg| arg.kind_of?(String) || arg.kind_of?(Symbol) }
Waves::ResponseMixin.module_eval do
[ :models, :controllers, :views, :helpers ].each do |k|
functor( k ) { app[ k ] }
functor( k, string_or_symbol ) { |name| app( name )[ k ] }
end
end
}.call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment