Sha256: b8399b713a313b16f9dfc6e029d88ab77bac534692dcb3dab9bfa821c6f3ba46

Contents?: true

Size: 539 Bytes

Versions: 4

Compression:

Stored size: 539 Bytes

Contents

# encoding: utf-8
require 'generators/generators'
require 'fileutils'

module Dslable::Generators
  # Dslable::Generators Gem Template Generator
  class GemTemplate
    attr_accessor :dsl

    # == initialize generate gem template
    # === Params
    #- _dsl: input from dsl
    def initialize(_dsl)
      @dsl = _dsl
    end

    # == generate gem template
    def generate
      `bundle gem #{@dsl._gem_name}`
      Dir.chdir(@dsl._gem_name)
      FileUtils.rm_rf("./lib/#{@dsl._gem_name}.rb")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dslable-0.0.6 lib/generators/gem_template.rb
dslable-0.0.5 lib/generators/gem_template.rb
dslable-0.0.4 lib/generators/gem_template.rb
dslable-0.0.3 lib/generators/gem_template.rb