Sha256: e1a731df90e1054f4883842ecf21d3532ba6cf721b5faf34259eaae05aae48b5

Contents?: true

Size: 509 Bytes

Versions: 2

Compression:

Stored size: 509 Bytes

Contents

module Documentation
  module Generators
    class ScaffoldGenerator < Rails::Generators::NamedBase
      argument :attributes, type: :array, default: [], banner: "field:type field:type"

      class_option :directory,  type: :string,  default: ".api"
      class_option :timestamps, type: :boolean, default: true

      source_root File.expand_path("templates", __dir__)

      def copy_files
        template "resource.md", "#{options.directory}/sections/#{plural_file_name}.md"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
documentation-zero-0.0.13 lib/generators/documentation/scaffold/scaffold_generator.rb
documentation-zero-0.0.12 lib/generators/documentation/scaffold/scaffold_generator.rb