Class: Rys::PatchGenerator

Inherits:
PatchGeneratorBase show all
Defined in:
lib/generators/rys/patch/patch_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ PatchGenerator


15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/generators/rys/patch/patch_generator.rb', line 15

def initialize(*args)
  super

  self.name ||= 'patch'

  begin
    plugin_engine = "#{plugin.camelize}::Engine".constantize
    self.destination_root = plugin_engine.root
  rescue NameError
    raise Rails::Generators::Error, "Plugin '#{plugin.camelize}' does not exist."
  end
end

Instance Method Details

#create_patchObject


28
29
30
# File 'lib/generators/rys/patch/patch_generator.rb', line 28

def create_patch
  create_patch_by_type
end