Class: Kybus::CLI::Bot::ControllerGenerator
- Inherits:
-
Object
- Object
- Kybus::CLI::Bot::ControllerGenerator
- Defined in:
- lib/kybus/cli/bot/controller_generator.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(name) ⇒ ControllerGenerator
constructor
A new instance of ControllerGenerator.
Constructor Details
#initialize(name) ⇒ ControllerGenerator
Returns a new instance of ControllerGenerator.
7 8 9 10 |
# File 'lib/kybus/cli/bot/controller_generator.rb', line 7 def initialize(name) @name = name @file_writer = Kybus::CLI::FileWriter.new('routes') end |
Instance Method Details
#generate ⇒ Object
12 13 14 |
# File 'lib/kybus/cli/bot/controller_generator.rb', line 12 def generate @file_writer.write("#{@name}_controller.rb", controller_content) end |