Sha256: b05987c24465f5b3fee4ac8747b46ca2a507ccf34e1d0220f6a773f9a32c4441
Contents?: true
Size: 883 Bytes
Versions: 9
Compression:
Stored size: 883 Bytes
Contents
require "inflecto" require "securerandom" require "dry/web/roda/generate" require "dry/web/roda/generators/app" module Dry module Web module Roda module Generators class Umbrella attr_reader :generate, :app_generator def initialize @generate = Generate.new("umbrella") @app_generator = Generators::App.new end def call(target_dir) generate.(target_dir, prepare_scope(target_dir)) Dir.chdir(target_dir) do app_generator.("main", umbrella: target_dir) end end private def prepare_scope(target_dir) { underscored_app_name: Inflecto.underscore(target_dir), camel_cased_app_name: Inflecto.camelize(target_dir) } end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems