Created
October 6, 2015 03:06
-
-
Save kwstannard/85378d4b1ae3186a20f2 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
| # app/models/user.rb | |
| Dryer.def_class(__FILE__) do | |
| def hi | |
| "hello world" | |
| end | |
| end | |
| User.new.hi | |
| => "hello world" | |
| # app/models/instruments/horn.rb | |
| Dryer.def_class(__FILE__) do | |
| def play | |
| "toot!" | |
| end | |
| end | |
| Instruments::Horn.new.play | |
| => "toot!" | |
| # app/models/address.rb | |
| Dryer.def_class(__FILE__, ActiveRecord::Base) do | |
| end | |
| Address.new.respond_to? :save | |
| => true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment