Sha256: bf09a2ae15da2225fc466bf8d7c062123150c7d8807bf9c302c003add4cf665b

Contents?: true

Size: 442 Bytes

Versions: 8

Compression:

Stored size: 442 Bytes

Contents

require 'thor/group'

module ChemistryKit
  module CLI
    class FormulaGenerator < Thor::Group
      include Thor::Actions

      argument :name

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

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

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
chemistrykit-2.1.0 lib/chemistrykit/cli/formula.rb
chemistrykit-2.0.0 lib/chemistrykit/cli/formula.rb
chemistrykit-1.3.0 lib/chemistrykit/cli/formula.rb
chemistrykit-1.2.1 lib/chemistrykit/cli/formula.rb
chemistrykit-1.2.0 lib/chemistrykit/cli/formula.rb
chemistrykit-1.1.1 lib/chemistrykit/cli/formula.rb
chemistrykit-1.1.0 lib/chemistrykit/cli/formula.rb
chemistrykit-1.0.0 lib/chemistrykit/cli/formula.rb