From 5554555b89020ba7d0ab3f54567ea5c35a432e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arist=C3=B3teles=20Coutinho?= Date: Fri, 17 Nov 2023 10:58:39 -0300 Subject: [PATCH] fix: added content_type method --- lib/lenna/router/response.rb | 7 +++++++ test/test_lennarb.rb | 13 ------------- 2 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 test/test_lennarb.rb diff --git a/lib/lenna/router/response.rb b/lib/lenna/router/response.rb index b167c08..3a996d9 100644 --- a/lib/lenna/router/response.rb +++ b/lib/lenna/router/response.rb @@ -99,6 +99,13 @@ def put_headers(headers) headers.each { |key, value| put_header(key, value) } end + # This method will get the content type. + # + # @return [String] the content type + # + # @api public + def content_type = header('Content-Type') + # This method will delete the header. # @param header [String] the header name # diff --git a/test/test_lennarb.rb b/test/test_lennarb.rb deleted file mode 100644 index c63ed31..0000000 --- a/test/test_lennarb.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class TestLennarb < Minitest::Test - def test_that_it_has_a_version_number - refute_nil ::Lennarb::VERSION - end - - def test_it_does_something_useful - assert true - end -end