Class: Lotus::Commands::Generate::Abstract
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
#add_mapping, #destroy, #generator, #map_templates, #post_process_templates, #process_templates, #start, #template_options
Constructor Details
#initialize(options) ⇒ Abstract
Returns a new instance of Abstract.
16
17
18
19
20
21
|
# File 'lib/lotus/commands/generate/abstract.rb', line 16
def initialize(options)
@options = Lotus::Utils::Hash.new(options).symbolize!
assert_options!
@target_path = Pathname.pwd
end
|
Instance Attribute Details
#options ⇒ Object
14
15
16
|
# File 'lib/lotus/commands/generate/abstract.rb', line 14
def options
@options
end
|
#target_path ⇒ Object
14
15
16
|
# File 'lib/lotus/commands/generate/abstract.rb', line 14
def target_path
@target_path
end
|
Instance Method Details
#template_source_path ⇒ Object
23
24
25
26
|
# File 'lib/lotus/commands/generate/abstract.rb', line 23
def template_source_path
generator = self.class.name.split('::').last.downcase
Pathname.new(::File.dirname(__FILE__) + "/../../generators/#{generator}/").realpath
end
|