Class: SimpleEndpoint::Endpoint::EndpointOptions
- Inherits:
-
Object
- Object
- SimpleEndpoint::Endpoint::EndpointOptions
- Defined in:
- lib/simple_endpoint/endpoint/endpoint_options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #before_response ⇒ Object
- #cases ⇒ Object
- #handler ⇒ Object
-
#initialize(**options) ⇒ EndpointOptions
constructor
A new instance of EndpointOptions.
- #invoker ⇒ Object
- #renderer_options ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(**options) ⇒ EndpointOptions
Returns a new instance of EndpointOptions.
8 9 10 |
# File 'lib/simple_endpoint/endpoint/endpoint_options.rb', line 8 def initialize(**) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/simple_endpoint/endpoint/endpoint_options.rb', line 6 def @options end |
Instance Method Details
#before_response ⇒ Object
24 25 26 |
# File 'lib/simple_endpoint/endpoint/endpoint_options.rb', line 24 def before_response @before_response ||= ([:before_response] || invoker.__before_response) || {} end |
#cases ⇒ Object
32 33 34 |
# File 'lib/simple_endpoint/endpoint/endpoint_options.rb', line 32 def cases @cases ||= [:default_cases].merge([:different_cases] || invoker.__different_cases || {}) end |
#handler ⇒ Object
28 29 30 |
# File 'lib/simple_endpoint/endpoint/endpoint_options.rb', line 28 def handler @handler ||= [:default_handler].merge([:different_handler] || invoker.__different_handler || {}) end |
#invoker ⇒ Object
12 13 14 |
# File 'lib/simple_endpoint/endpoint/endpoint_options.rb', line 12 def invoker [:invoker] end |
#renderer_options ⇒ Object
20 21 22 |
# File 'lib/simple_endpoint/endpoint/endpoint_options.rb', line 20 def @renderer_options ||= [:renderer_options] || {} end |
#result ⇒ Object
16 17 18 |
# File 'lib/simple_endpoint/endpoint/endpoint_options.rb', line 16 def result [:result] end |