Class: RabbitMQHttpAuthBackend::App::ResponseFormatter
- Defined in:
- lib/rabbitmq_http_auth_backend/app/response_formatter.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(response) ⇒ ResponseFormatter
constructor
A new instance of ResponseFormatter.
Methods inherited from Service
Constructor Details
#initialize(response) ⇒ ResponseFormatter
Returns a new instance of ResponseFormatter.
8 9 10 |
# File 'lib/rabbitmq_http_auth_backend/app/response_formatter.rb', line 8 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'lib/rabbitmq_http_auth_backend/app/response_formatter.rb', line 6 def response @response end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rabbitmq_http_auth_backend/app/response_formatter.rb', line 12 def call action = response[0] = response[1] if action == :allow && "#{action} #{.join(' ')}" else action.to_s end end |