From bd80fc7ecb7482e8ffc984267ac12e0bf4c317b4 Mon Sep 17 00:00:00 2001 From: Gary Mardell Date: Thu, 31 Oct 2024 14:34:39 -0700 Subject: [PATCH] Add abstract definition for debug_message --- src/lucky/data_response.cr | 3 ++- src/lucky/file_response.cr | 3 ++- src/lucky/response.cr | 1 + src/lucky/text_response.cr | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lucky/data_response.cr b/src/lucky/data_response.cr index a143a6d34..ae30a4e30 100644 --- a/src/lucky/data_response.cr +++ b/src/lucky/data_response.cr @@ -31,7 +31,8 @@ class Lucky::DataResponse < Lucky::Response DEFAULT_STATUS = 200 - getter context, data, content_type, filename, debug_message, headers + getter context, data, content_type, filename, headers + getter debug_message : String? def initialize(@context : HTTP::Server::Context, @data : String, diff --git a/src/lucky/file_response.cr b/src/lucky/file_response.cr index 64e2feb84..0968acb52 100644 --- a/src/lucky/file_response.cr +++ b/src/lucky/file_response.cr @@ -41,7 +41,8 @@ class Lucky::FileResponse < Lucky::Response DEFAULT_STATUS = 200 - getter context, path, filename, debug_message, headers + getter context, path, filename, headers + getter debug_message : String? def initialize(@context : HTTP::Server::Context, @path : String, diff --git a/src/lucky/response.cr b/src/lucky/response.cr index b6bc7ebc9..0b094987c 100644 --- a/src/lucky/response.cr +++ b/src/lucky/response.cr @@ -1,4 +1,5 @@ abstract class Lucky::Response abstract def print abstract def status : Int + abstract def debug_message : String? end diff --git a/src/lucky/text_response.cr b/src/lucky/text_response.cr index 56cb6974d..b1f876975 100644 --- a/src/lucky/text_response.cr +++ b/src/lucky/text_response.cr @@ -10,7 +10,8 @@ class Lucky::TextResponse < Lucky::Response DEFAULT_STATUS = 200 - getter context, content_type, body, debug_message, enable_cookies + getter context, content_type, body, enable_cookies + getter debug_message : String? def initialize(@context : HTTP::Server::Context, @content_type : String,