Created
June 8, 2015 16:34
-
-
Save mcardacci/05d09877e8430aa757a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Http_Response | |
attr_reader :version, :status_code, :reason_phrase, :content_type, :body | |
def intialize(args) | |
@version = args.fetch(:version) | |
@status_code = args.fetch(:status_code) | |
@reason_phrase = args.fetch(:reason_phrase) | |
@content_type = args.fetch(:content_type) | |
@body = args.fetch(:body) | |
end | |
def to_s | |
puts "#{version} #{status_code} #{reason_phrase} \n #{content_type} \n \n #{body} \n " | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment