Class: Lono::AbstractBase

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Includes:
Blueprint::Root
Defined in:
lib/lono/abstract_base.rb

Instance Method Summary collapse

Methods included from Blueprint::Root

#find_blueprint_root, #set_blueprint_root

Constructor Details

#initialize(options = {}) ⇒ AbstractBase

Returns a new instance of AbstractBase.



6
7
8
# File 'lib/lono/abstract_base.rb', line 6

def initialize(options={})
  reinitialize(options)
end

Instance Method Details

#reinitialize(options) ⇒ Object

Hack so that we can use include Thor::Base



11
12
13
14
15
16
17
18
19
# File 'lib/lono/abstract_base.rb', line 11

def reinitialize(options)
  @options = options
  Lono::ProjectChecker.check
  @stack, @blueprint, @template, @param = Conventions.new(options).values

  return if options[:source]
  set_blueprint_root(@blueprint)
  Lono::ProjectChecker.empty_templates
end

#template_pathObject



21
22
23
# File 'lib/lono/abstract_base.rb', line 21

def template_path
  "#{Lono.config.output_path}/#{@blueprint}/templates/#{@template}.yml"
end