Class: InertiaFlow::Renderer
- Inherits:
-
Object
- Object
- InertiaFlow::Renderer
- Defined in:
- lib/inertia_flow/renderer.rb
Instance Attribute Summary collapse
-
#component ⇒ Object
Returns the value of attribute component.
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#options ⇒ Object
Returns the value of attribute options.
-
#request ⇒ Object
Returns the value of attribute request.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(component, options, controller, request, response) ⇒ Renderer
constructor
A new instance of Renderer.
- #render ⇒ Object
Constructor Details
#initialize(component, options, controller, request, response) ⇒ Renderer
Returns a new instance of Renderer.
9 10 11 12 13 14 15 |
# File 'lib/inertia_flow/renderer.rb', line 9 def initialize(component, , controller, request, response) @component = component @options = @controller = controller @request = request @response = response end |
Instance Attribute Details
#component ⇒ Object
Returns the value of attribute component.
7 8 9 |
# File 'lib/inertia_flow/renderer.rb', line 7 def component @component end |
#controller ⇒ Object
Returns the value of attribute controller.
7 8 9 |
# File 'lib/inertia_flow/renderer.rb', line 7 def controller @controller end |
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/inertia_flow/renderer.rb', line 7 def @options end |
#request ⇒ Object
Returns the value of attribute request.
7 8 9 |
# File 'lib/inertia_flow/renderer.rb', line 7 def request @request end |
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/inertia_flow/renderer.rb', line 7 def response @response end |
Instance Method Details
#render ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/inertia_flow/renderer.rb', line 17 def render props = jbuilder_attributes InertiaRails::Renderer.new( component, controller, request, response, render_method, props: props, view_data: [:view_data] ).render end |