class Andrake::Generator::Rakefile
Public Class Methods
run!()
click to toggle source
# File lib/andrake/generator/rakefile.rb, line 4 def run! check_file create_file end
Private Class Methods
check_file()
click to toggle source
# File lib/andrake/generator/rakefile.rb, line 10 def check_file raise if File.exists?(rakefile) end
create_file()
click to toggle source
# File lib/andrake/generator/rakefile.rb, line 14 def create_file template_result = File.read(File.join(template_dir, rakefile)) File.open(rakefile, 'w') {|file| file.write(template_result) } end
rakefile()
click to toggle source
# File lib/andrake/generator/rakefile.rb, line 19 def rakefile ; 'Rakefile' ; end
template_dir()
click to toggle source
# File lib/andrake/generator/rakefile.rb, line 20 def template_dir ; File.expand_path(File.dirname(__FILE__) + '/../templates') ; end