Sha256: 0f5ba4400f5ee2e2e26ddf0ea743013a3c5977149c24dc50211d46aba4d58144
Contents?: true
Size: 989 Bytes
Versions: 2
Compression:
Stored size: 989 Bytes
Contents
module Foobara module Generators module DomainGenerator module Generators class DomainGenerator < Foobara::FilesGenerator class << self def manifest_to_generator_classes(manifest) case manifest when DomainConfig [ Generators::DomainGenerator ] else # :nocov: raise "Not sure how build a generator for a #{manifest}" # :nocov: end end end def template_path ["src", "domain.rb.erb"] end def target_path *path, file = module_path.map { |part| Util.underscore(part) } file = "#{file}.rb" ["src", *path, file] end alias domain_config relevant_manifest def templates_dir "#{__dir__}/../templates" end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foobara-domain-generator-0.0.2 | src/domain_generator.rb |
foobara-domain-generator-0.0.1 | src/domain_generator.rb |