Class: InertiaRails::RSpec::InertiaRenderWrapper
- Inherits:
-
Object
- Object
- InertiaRails::RSpec::InertiaRenderWrapper
- Defined in:
- lib/inertia_rails/rspec.rb
Instance Attribute Summary collapse
-
#component ⇒ Object
readonly
Returns the value of attribute component.
-
#props ⇒ Object
readonly
Returns the value of attribute props.
-
#view_data ⇒ Object
readonly
Returns the value of attribute view_data.
Instance Method Summary collapse
- #call(params) ⇒ Object
-
#initialize ⇒ InertiaRenderWrapper
constructor
A new instance of InertiaRenderWrapper.
- #wrap_render(render_method) ⇒ Object
Constructor Details
#initialize ⇒ InertiaRenderWrapper
Returns a new instance of InertiaRenderWrapper.
11 12 13 14 15 |
# File 'lib/inertia_rails/rspec.rb', line 11 def initialize @view_data = nil @props = nil @component = nil end |
Instance Attribute Details
#component ⇒ Object (readonly)
Returns the value of attribute component.
9 10 11 |
# File 'lib/inertia_rails/rspec.rb', line 9 def component @component end |
#props ⇒ Object (readonly)
Returns the value of attribute props.
9 10 11 |
# File 'lib/inertia_rails/rspec.rb', line 9 def props @props end |
#view_data ⇒ Object (readonly)
Returns the value of attribute view_data.
9 10 11 |
# File 'lib/inertia_rails/rspec.rb', line 9 def view_data @view_data end |
Instance Method Details
#call(params) ⇒ Object
17 18 19 20 |
# File 'lib/inertia_rails/rspec.rb', line 17 def call(params) assign_locals(params) @render_method&.call(params) end |
#wrap_render(render_method) ⇒ Object
22 23 24 25 |
# File 'lib/inertia_rails/rspec.rb', line 22 def wrap_render(render_method) @render_method = render_method self end |