Module: Gempilot::CLI::Generator::ClassMethods

Defined in:
lib/gempilot/cli/generator.rb

Overview

Class-level helpers for Generator, including template_dir resolution.

Instance Method Summary collapse

Instance Method Details

#template_dir(path = nil) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/gempilot/cli/generator.rb', line 20

def template_dir(path = nil)
  if path
    @template_dir = File.expand_path(path)
  else
    @template_dir || (superclass.template_dir if superclass.respond_to?(:template_dir))
  end
end