From 6de8a90f546ba8521f6ba0969e8803ecb36606ef Mon Sep 17 00:00:00 2001 From: Petrik de Heus Date: Thu, 11 Dec 2025 21:01:02 +0100 Subject: [PATCH] Fix Application example in README.md The properties probably need to be defined outside the initialize method. --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index db10f7e..2241943 100644 --- a/README.md +++ b/README.md @@ -72,18 +72,18 @@ end class Application include Grip::Application - def initialize - # You can include as many handlers as you want, - # for now we will just log the requests and provide an HTTP handler. - property handlers : Array(HTTP::Handler) = [ - Grip::Handlers::Log.new, - Grip::Handlers::HTTP.new - ] of HTTP::Handler + # You can include as many handlers as you want, + # for now we will just log the requests and provide an HTTP handler. + property handlers : Array(HTTP::Handler) = [ + Grip::Handlers::Log.new, + Grip::Handlers::HTTP.new + ] of HTTP::Handler - # By default the environment is set to "DEVELOPMENT". - property environment : String = - ENV["ENVIRONMENT"]? || "PRODUCTION" + # By default the environment is set to "DEVELOPMENT". + property environment : String = + ENV["ENVIRONMENT"]? || "PRODUCTION" + def initialize scope "/api" do scope "/v1" do get "/", IndexController