Class: ChemistryKit::CLI::FormulaGenerator

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/chemistrykit/cli/formula.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



10
11
12
# File 'lib/chemistrykit/cli/formula.rb', line 10

def self.source_root
  File.join(File.dirname(File.expand_path(__FILE__)), '../../templates/')
end

Instance Method Details

#copy_fileObject



14
15
16
17
# File 'lib/chemistrykit/cli/formula.rb', line 14

def copy_file
  template "formula.tt", "./formulas/#{name}.rb"
  template "beaker_with_formula.tt", "./beakers/#{name}_beaker.rb"
end