Class: JaxGeneratorInvoker

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/jax/generators/commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.basenameObject



95
96
97
# File 'lib/jax/generators/commands.rb', line 95

def self.basename
  "jax generate"
end

Instance Method Details

#controller(*args) ⇒ Object



100
101
102
# File 'lib/jax/generators/commands.rb', line 100

def controller(*args)
  Jax::Generators::Controller::ControllerGenerator.start(ARGV[1..-1])
end

#light(*args) ⇒ Object



110
111
112
# File 'lib/jax/generators/commands.rb', line 110

def light(*args)
  Jax::Generators::LightSource::LightSourceGenerator.start(args, :behavior => behavior)
end

#material(*args) ⇒ Object



115
116
117
118
119
# File 'lib/jax/generators/commands.rb', line 115

def material(*args)
  args = ARGV.dup
  args.shift
  Jax::Generators::Material::MaterialGenerator.start(args, :behavior => behavior)
end

#model(*args) ⇒ Object



105
106
107
# File 'lib/jax/generators/commands.rb', line 105

def model(*args)
  Jax::Generators::Model::ModelGenerator.start(args, :behavior => behavior)
end

#plugin(*args) ⇒ Object



134
135
136
# File 'lib/jax/generators/commands.rb', line 134

def plugin(*args)
  Jax::Generators::Plugin::PluginGenerator.start(ARGV[1..-1], :behavior => behavior)
end

#scaffold(name) ⇒ Object



122
123
124
125
126
# File 'lib/jax/generators/commands.rb', line 122

def scaffold(name)
  Jax::Generators::Controller::ControllerGenerator.start([name, 'index'], :behavior => behavior)
  Jax::Generators::Model::ModelGenerator.start([name], :behavior => behavior)
  Jax::Generators::Material::MaterialGenerator.start([name], :behavior => behavior)
end

#shader(*name) ⇒ Object



129
130
131
# File 'lib/jax/generators/commands.rb', line 129

def shader(*name)
  Jax::Generators::Shader::ShaderGenerator.start(name, :behavior => behavior)
end