Last active
October 17, 2017 09:12
-
-
Save hanachin/9c7585d7e0f8ba52c58eb09455968758 to your computer and use it in GitHub Desktop.
rakeタスクの中だけで使うメソッドはRefinementsで定義するとべんり ref: http://qiita.com/hanachin_/items/6cf63dd3987a60e3d264
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
% rake hi | |
hi |
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
m = Module.new do | |
def hi | |
puts :hi | |
end | |
end | |
desc 'はい' | |
task :hi do | |
include m | |
hi | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment