Replies: 2 comments 1 reply
-
Actually I think atm it will only benefit for Proxy, but the same idea might be applied to features as well: module HTTP
class Feature < Literal::Data
def wrap_request(request)
request
end
def wrap_response(response)
response
end
def on_error(_request, _error); end
end
module Features
class Logging < Feature
prop :logger, _Interface(:debug, :info), default: -> { NullLogger.new }
class NullLogger
def info(...); end
def debug(...); end
end
# ...
end
end
end |
Beta Was this translation helpful? Give feedback.
0 replies
-
It would be great to address #558 in an options refactoring |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, options rely on Hashes. Although those are fine, but that blows up
Chainable
with custom builders for those. I propose refactor all of the options to standalone classes with help of Literal gem:cc: @tarcieri
Beta Was this translation helpful? Give feedback.
All reactions