class Clove::Generator
Public Class Methods
source_root()
click to toggle source
# File lib/clove.rb, line 13 def self.source_root File.dirname(__FILE__) end
Public Instance Methods
create_bin_file()
click to toggle source
# File lib/clove.rb, line 33 def create_bin_file if yes? "Create an executable file?" template "templates/bin.tt", "#{name}/bin/#{name}" chmod "#{name}/bin/#{name}", 0755 end end
create_gemfile()
click to toggle source
# File lib/clove.rb, line 21 def create_gemfile template "templates/Gemfile.tt", "#{name}/Gemfile" end
create_lib_file()
click to toggle source
# File lib/clove.rb, line 25 def create_lib_file template "templates/lib.tt", "#{name}/lib/#{name}.rb" end
create_rakefile()
click to toggle source
# File lib/clove.rb, line 17 def create_rakefile template "templates/Rakefile.tt", "#{name}/Rakefile" end
create_test_file()
click to toggle source
# File lib/clove.rb, line 29 def create_test_file template "templates/test.tt", "#{name}/test/#{name}_test.rb" end