Class: Captcha::CaptchaVerificationService::RequestStruct
- Inherits:
-
Struct
- Object
- Struct
- Captcha::CaptchaVerificationService::RequestStruct
- Defined in:
- app/services/captcha/captcha_verification_service.rb
Overview
Currently the only value that is used out of the request by the reCAPTCHA library is ‘remote_ip’. Therefore, we just create a struct to avoid passing the full request object through all the service layer objects, and instead just rely on passing only the required remote_ip value. This eliminates the need to couple the service layer to the HTTP request (for the purpose of this service, at least).
Instance Attribute Summary collapse
-
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
Instance Attribute Details
#remote_ip ⇒ Object
Returns the value of attribute remote_ip
15 16 17 |
# File 'app/services/captcha/captcha_verification_service.rb', line 15 def remote_ip @remote_ip end |