Advertisement
micalexander

Untitled

Oct 1st, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1.  
  2. class Test < Thor
  3. include Thor::Actions
  4.  
  5. def self.source_root
  6. File.dirname(__FILE__)
  7. end
  8.  
  9. desc "example", "an example task"
  10. def gsub_file
  11.  
  12. gsub_file 'README', /localprojectdirectory/, :green do |match|
  13. match << " no more. Use thor!"
  14. end
  15.  
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement