Sha256: 661d35fa12d185fe12cb13ae8fbdfb0c230de7a7f73f3348ea72879d724217e9

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

module Hyla
  module Commands
    class Create < Command

      def self.process(args, options = {})

          @config = Hyla::Configuration.new

          destination = options[:destination]
          artefact_type = options[:artefact_type]
          type = options[:type]

          copy_artefact(type, artefact_type, destination)
      end

      def self.copy_artefact(type, artefact_type, destination)
        artefact_name = type + '_' + artefact_type + @config.ADOC_EXT
        source = [@config.templates, 'sample', artefact_name] * '/'
        destination = [destination] * '/'
        FileUtils.cp(source, destination)
      end

    end # class
  end # module Commands
end # module Hyla

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyla-1.0 lib/hyla/commands/create.rb