Skip to content
Closed
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
4 changes: 4 additions & 0 deletions lib/acme/client/resources/challenges/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ def initialize(client, **arguments)
assign_attributes(arguments)
end

def [](key)
to_h[key]
end

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why not simply calling #to_h within your app for that use case?

Also, would you prefer to keep them as a challenge object? I could implement an UnknownChallenge and this way you could call status, request_validation, etc, directly on it?

def challenge_type
self.class::CHALLENGE_TYPE
end
Expand Down