Sha256: ff3821e842a88e0f7ba31db76d77f8a4e2287f0fa7fb4be8b98abb7c38d59329

Contents?: true

Size: 357 Bytes

Versions: 9

Compression:

Stored size: 357 Bytes

Contents

parse do
  usage "geny new [NAME]"
  description "create a new generator"
  argument :name, desc: "name for your generator", required: true
end

invoke do
  templates.copy "generator.rb.erb", generator_path
end

helpers do
  def generator_path
    path = name.split(Geny::Command::SEPARATOR)
    File.join(".geny", *path, Geny::Command::FILENAME)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
geny-2.5.2 lib/geny/generators/new/generator.rb
geny-2.5.1 lib/geny/generators/new/generator.rb
geny-2.5.0 lib/geny/generators/new/generator.rb
geny-2.4.0 lib/geny/generators/new/generator.rb
geny-2.3.0 lib/geny/generators/new/generator.rb
geny-2.2.0 lib/geny/generators/new/generator.rb
geny-2.1.4 lib/geny/generators/new/generator.rb
geny-2.1.3 lib/geny/generators/new/generator.rb
geny-2.1.2 lib/geny/generators/new/generator.rb