Class: InertiaRails::BaseProp
- Inherits:
-
Object
- Object
- InertiaRails::BaseProp
- Defined in:
- lib/inertia_rails/base_prop.rb
Overview
Base class for all props.
Direct Known Subclasses
Instance Method Summary collapse
- #call(controller) ⇒ Object
-
#initialize(&block) ⇒ BaseProp
constructor
A new instance of BaseProp.
Constructor Details
#initialize(&block) ⇒ BaseProp
Returns a new instance of BaseProp.
6 7 8 |
# File 'lib/inertia_rails/base_prop.rb', line 6 def initialize(&block) @block = block end |
Instance Method Details
#call(controller) ⇒ Object
10 11 12 |
# File 'lib/inertia_rails/base_prop.rb', line 10 def call(controller) controller.instance_exec(&@block) end |