Class: Quartet::Builders::App

Inherits:
Builder
  • Object
show all
Defined in:
lib/quartet/builders/app.rb

Instance Method Summary collapse

Methods inherited from Builder

#filepath, #initialize, #underscore

Constructor Details

This class inherits a constructor from Quartet::Builders::Builder

Instance Method Details

#build(_app_name) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/quartet/builders/app.rb', line 5

def build(_app_name)
  %{# frozen_string_literal: true

require 'sinatra'
require 'sinatra/activerecord'

# Require files in models and lib directories
Dir["./models/*.rb"].each {|file| require_relative file }
Dir[File.join("./lib", "**/*.rb")].each {|file| require_relative file }

get '/' do
  erb :welcome
end
}
end