Skip to content

Add abstract definition for debug_message #1927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lucky/data_response.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/lucky/file_response.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/lucky/response.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
abstract class Lucky::Response
abstract def print
abstract def status : Int
abstract def debug_message : String?
end
3 changes: 2 additions & 1 deletion src/lucky/text_response.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down