Method: Padrino::Generators::Plugin#setup_plugin

Defined in:
padrino-gen/lib/padrino-gen/generators/plugin.rb

#setup_pluginObject

Create the Padrino Plugin.



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'padrino-gen/lib/padrino-gen/generators/plugin.rb', line 35

def setup_plugin
  if options[:list] || plugin_file.nil?
    list_plugins
  else # executing the plugin instructions
    self.destination_root = options[:root]
    if in_app_root?
      self.behavior = :revoke if options[:destroy]
      execute_runner(:plugin, plugin_file)
    else
      say 'You are not at the root of a Padrino application! (config/boot.rb not found)'
    end
  end
end