Sha256: 1b8214c3d6f1c0f014da1f183b88b55749324f90d04ce152bb4042514d7ce4e2

Contents?: true

Size: 721 Bytes

Versions: 2

Compression:

Stored size: 721 Bytes

Contents

require "securerandom"
require "dry/web/roda/generate"
require "dry/web/roda/generators/inflections"

module Dry
  module Web
    module Roda
      module Generators
        class FlatProject
          attr_reader :generate

          def initialize
            @generate = Generate.new("flat_project")
          end

          def call(target_dir)
            generate.(target_dir, prepare_scope(target_dir))
          end

          private

          def prepare_scope(target_dir)
            {
              underscored_app_name: Inflections.underscored_name(target_dir),
              camel_cased_app_name: Inflections.camel_cased_name(target_dir)
            }
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dry-web-roda-0.6.3 lib/dry/web/roda/generators/flat_project.rb
dry-web-roda-0.6.2 lib/dry/web/roda/generators/flat_project.rb