Skip to content

Commit

Permalink
feat: Use enumarable for collection delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
2k-joker committed Jul 11, 2024
1 parent 59b77e8 commit 8fc143a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/httpigeon/response.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module HTTPigeon
class Response
include Enumerable

attr_reader :request, :parsed_response, :raw_response

delegate :map, :to_a, :to_h, :to_json, :with_indifferent_access, to: :parsed_response
delegate :each, :to_h, :to_json, :with_indifferent_access, to: :parsed_response
delegate :status, :body, :env, to: :raw_response

def initialize(request, raw_response)
Expand Down

0 comments on commit 8fc143a

Please sign in to comment.