Class: FallCli::Middleware::Base

Inherits:
Object
  • Object
show all
Includes:
Thor::Shell
Defined in:
lib/fallcli/middleware/base.rb

Overview

A base middleware class to initalize.

Constant Summary collapse

CLEAR =

Some colors for making things pretty.

"\e[0m"
RED =
"\e[31m"
GREEN =
"\e[32m"
YELLOW =
"\e[33m"

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Base



15
16
17
18
19
# File 'lib/fallcli/middleware/base.rb', line 15

def initialize(app)
  @app = app
  # This resets the color to "clear" on the user's terminal.
  say "", :clear, false
end

Instance Method Details

#call(env) ⇒ Object



21
22
23
# File 'lib/fallcli/middleware/base.rb', line 21

def call(env)
  @app.call(env)
end