Class: Ella::RackfileGenerator

Inherits:
Generator show all
Defined in:
lib/ella/generator/rackfile_generator.rb

Overview

The nature of Sinatra and Puma means that the config.ru file must initialize certain files. To make Ella work, this must be updated before the server is started. This is essentially a hack to deal with the fact that Sinatra was designed, apparently, to run one single controller file.

Instance Method Summary collapse

Methods inherited from Generator

#initialize

Constructor Details

This class inherits a constructor from Ella::Generator

Instance Method Details

#run(mode = 'development') ⇒ Object



10
11
12
13
14
15
# File 'lib/ella/generator/rackfile_generator.rb', line 10

def run(mode = 'development')
  @mode = mode
  Ella.find_root
  Log.info('Generating rack.ru...')
  write
end