Class: Lucid::Generators::PluginGenerator

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/lucid/generators/plugin/plugin_generator.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#classified_nameObject (readonly)

Returns the value of attribute classified_name


7
8
9
# File 'lib/lucid/generators/plugin/plugin_generator.rb', line 7

def classified_name
  @classified_name
end

Class Method Details

.source_rootObject


11
12
13
# File 'lib/lucid/generators/plugin/plugin_generator.rb', line 11

def self.source_root
  "#{File.dirname(__FILE__)}/templates"
end

Instance Method Details

#add_gemspecObject


21
22
23
# File 'lib/lucid/generators/plugin/plugin_generator.rb', line 21

def add_gemspec
  template 'gemspec.erb', "#{plugin_path}.gemspec"
end

#add_require_fileObject


29
30
31
# File 'lib/lucid/generators/plugin/plugin_generator.rb', line 29

def add_require_file
  template 'require.erb', "lib/#{plugin_path}.rb"
end

#add_version_fileObject


25
26
27
# File 'lib/lucid/generators/plugin/plugin_generator.rb', line 25

def add_version_file
  template 'version.erb', "lib/#{plugin_path}/version.rb"
end

#create_baseObject


15
16
17
18
19
# File 'lib/lucid/generators/plugin/plugin_generator.rb', line 15

def create_base
  empty_directory plugin_path
  self.destination_root = plugin_path
  @classified_name = plugin_path.classify
end