Class: RobotLab::Generators::RobotGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- RobotLab::Generators::RobotGenerator
- Defined in:
- lib/generators/robot_lab/robot_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_robot_file ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/generators/robot_lab/robot_generator.rb', line 17 def create_robot_file if [:routing] template "routing_robot.rb.tt", "app/robots/#{file_name}_robot.rb" else template "robot.rb.tt", "app/robots/#{file_name}_robot.rb" end end |
#create_test_file ⇒ Object
25 26 27 |
# File 'lib/generators/robot_lab/robot_generator.rb', line 25 def create_test_file template "robot_test.rb.tt", "test/robots/#{file_name}_robot_test.rb" end |