Class: InertiaRails::DeferProp

Inherits:
IgnoreOnFirstLoadProp show all
Defined in:
lib/inertia_rails/defer_prop.rb

Constant Summary collapse

DEFAULT_GROUP =
'default'

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseProp

#call

Constructor Details

#initialize(group: nil, merge: nil, &block) ⇒ DeferProp

Returns a new instance of DeferProp.



9
10
11
12
13
14
15
# File 'lib/inertia_rails/defer_prop.rb', line 9

def initialize(group: nil, merge: nil, &block)
  super(&block)

  @group = group || DEFAULT_GROUP
  @merge = merge
  @block = block
end

Instance Attribute Details

#groupObject (readonly)

Returns the value of attribute group.



7
8
9
# File 'lib/inertia_rails/defer_prop.rb', line 7

def group
  @group
end

Instance Method Details

#merge?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/inertia_rails/defer_prop.rb', line 17

def merge?
  @merge
end