Class: InertiaRails::Testing::TestResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/inertia_rails/testing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#componentObject (readonly)

Returns the value of attribute component.



23
24
25
# File 'lib/inertia_rails/testing.rb', line 23

def component
  @component
end

#deferred_propsObject (readonly)

Returns the value of attribute deferred_props.



23
24
25
# File 'lib/inertia_rails/testing.rb', line 23

def deferred_props
  @deferred_props
end

#flashObject (readonly)

Returns the value of attribute flash.



23
24
25
# File 'lib/inertia_rails/testing.rb', line 23

def flash
  @flash
end

#propsObject (readonly)

Returns the value of attribute props.



23
24
25
# File 'lib/inertia_rails/testing.rb', line 23

def props
  @props
end

#view_dataObject (readonly)

Returns the value of attribute view_data.



23
24
25
# File 'lib/inertia_rails/testing.rb', line 23

def view_data
  @view_data
end

Instance Method Details

#call(params) ⇒ Object



25
26
27
28
# File 'lib/inertia_rails/testing.rb', line 25

def call(params)
  assign_locals(params)
  @render_method&.call(params)
end

#wrap_render(render_method) ⇒ Object



30
31
32
33
# File 'lib/inertia_rails/testing.rb', line 30

def wrap_render(render_method)
  @render_method = render_method
  self
end