Class: ChemistryKit::CLI::FormulaGenerator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- ChemistryKit::CLI::FormulaGenerator
- Includes:
- Thor::Actions
- Defined in:
- lib/chemistrykit/cli/formula.rb
Overview
Creates a starting formula from a template
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
13 14 15 |
# File 'lib/chemistrykit/cli/formula.rb', line 13 def self.source_root File.join(File.dirname(File.(__FILE__)), '../../templates/') end |
Instance Method Details
#copy_file ⇒ Object
17 18 19 20 |
# File 'lib/chemistrykit/cli/formula.rb', line 17 def copy_file template 'formula.tt', "./formulas/#{name}.rb" template 'beaker_with_formula.tt', "./beakers/#{name}_beaker.rb" end |