Class: Hanami::Commands::Generate::Abstract
- Includes:
- Generators::Generatable
- Defined in:
- lib/hanami/commands/generate/abstract.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#target_path ⇒ Object
readonly
Returns the value of attribute target_path.
Instance Method Summary collapse
-
#initialize(options) ⇒ Abstract
constructor
A new instance of Abstract.
- #template_source_path ⇒ Object
Methods included from Generators::Generatable
#add_mapping, #argument_blank?, #destroy, #generator, #map_templates, #post_process_templates, #process_templates, #start, #template_options
Methods inherited from Command
Constructor Details
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
16 17 18 |
# File 'lib/hanami/commands/generate/abstract.rb', line 16 def @options end |
#target_path ⇒ Object (readonly)
Returns the value of attribute target_path.
16 17 18 |
# File 'lib/hanami/commands/generate/abstract.rb', line 16 def target_path @target_path end |
Instance Method Details
#template_source_path ⇒ Object
27 28 29 30 |
# File 'lib/hanami/commands/generate/abstract.rb', line 27 def template_source_path generator = self.class.name.split('::').last.downcase Pathname.new(::File.dirname(__FILE__) + "/../../generators/#{generator}/").realpath end |