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.
9 10 11 12 13 |
# File 'lib/inertia_rails/rspec.rb', line 9 def initialize @view_data = nil @props = nil @component = nil end |
Instance Attribute Details
#component ⇒ Object (readonly)
Returns the value of attribute component.
7 8 9 |
# File 'lib/inertia_rails/rspec.rb', line 7 def component @component end |
#props ⇒ Object (readonly)
Returns the value of attribute props.
7 8 9 |
# File 'lib/inertia_rails/rspec.rb', line 7 def props @props end |
#view_data ⇒ Object (readonly)
Returns the value of attribute view_data.
7 8 9 |
# File 'lib/inertia_rails/rspec.rb', line 7 def view_data @view_data end |
Instance Method Details
#call(params) ⇒ Object
15 16 17 18 |
# File 'lib/inertia_rails/rspec.rb', line 15 def call(params) set_values(params) @render_method&.call(params) end |
#wrap_render(render_method) ⇒ Object
20 21 22 23 |
# File 'lib/inertia_rails/rspec.rb', line 20 def wrap_render(render_method) @render_method = render_method self end |