Class: Kybus::CLI::Bot::ControllerGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/kybus/cli/bot/controller_generator.rb

Instance Method Summary collapse

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

#generateObject



12
13
14
# File 'lib/kybus/cli/bot/controller_generator.rb', line 12

def generate
  @file_writer.write("#{@name}_controller.rb", controller_content)
end