Class: Jax::Generators::LightGenerator
- Inherits:
-
NamedBase
- Object
- Rails::Generators::NamedBase
- NamedBase
- Jax::Generators::LightGenerator
- Defined in:
- lib/generators/jax/light/light_generator.rb
Instance Method Summary collapse
Methods included from SourceRoot
Methods included from CoffeeGenerator
Instance Method Details
#create_light_source ⇒ Object
17 18 19 20 |
# File 'lib/generators/jax/light/light_generator.rb', line 17 def create_light_source template "light_source.resource.erb", File.join('app/assets/jax/resources/light_sources', "#{file_name}.resource") end |
#light_type ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/generators/jax/light/light_generator.rb', line 8 def light_type case type when 'spot', 'directional', 'point' type.upcase + "_LIGHT" else raise "Invalid light type. Expected one of ['spot', 'directional', 'point']" end end |