Class: Jax::Generators::PluggableCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/jax/generators/commands.rb

Overview

Generators extending PluggableCommand will produce code in either a Jax application proper, or in a plugin within the app.

Instance Method Summary collapse

Methods inherited from Command

inherited

Methods included from Usage

extended, included

Instance Method Details

#check_plugin_destinationObject



73
74
75
76
77
78
79
# File 'lib/jax/generators/commands.rb', line 73

def check_plugin_destination
  if ENV['JAX_CWD'] && cwd = File.expand_path('.', ENV['JAX_CWD'])
    if cwd =~ /^#{Regexp::escape File.join(Jax.root, "vendor/plugins/", "")}(.*?)(\/|$)/
      self.destination_root = Jax.root.join("vendor", "plugins", $1)
    end
  end
end