Class: ChemistryKit::CLI::FormulaGenerator

Inherits:
Thor::Group
  • Object
show all
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_rootObject



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

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

Instance Method Details

#copy_fileObject



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