Sha256: d9ea42bede13a8cc3ae5d2bb6b39f235546d6a266bc4af3dd55b583500acd86e

Contents?: true

Size: 564 Bytes

Versions: 9

Compression:

Stored size: 564 Bytes

Contents

require 'thor'
require 'active_support/all'

module Napa
  module Generators
    class ApiGenerator < Thor::Group
      include Thor::Actions
      argument :generator_name # allows us to type reasonable CLI commands
      argument :name

      def name_underscore
        name.underscore
      end

      def name_tableize
        name.tableize
      end

      def generate
        self.class.source_root "#{File.dirname(__FILE__)}/templates/api"
        say 'Generating api...'
        directory '.', '.'
        say 'Done!', :green
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
napa-0.1.23 lib/napa/generators/api_generator.rb
napa-0.1.22 lib/napa/generators/api_generator.rb
napa-0.1.21 lib/napa/generators/api_generator.rb
napa-0.1.20 lib/napa/generators/api_generator.rb
napa-0.1.19 lib/napa/generators/api_generator.rb
napa-0.1.18 lib/napa/generators/api_generator.rb
napa-0.1.17 lib/napa/generators/api_generator.rb
napa-0.1.16 lib/napa/generators/api_generator.rb
napa-0.1.15 lib/napa/generators/api_generator.rb