Skip to content

Commit

Permalink
Add abstract definition for debug_message (#1927)
Browse files Browse the repository at this point in the history
  • Loading branch information
garymardell authored Oct 31, 2024
1 parent 2c1433d commit 921436f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
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

0 comments on commit 921436f

Please sign in to comment.