Class: InertiaRails::DeferProp

Inherits:
IgnoreOnFirstLoadProp show all
Includes:
PropMergeable, PropOnceable
Defined in:
lib/inertia_rails/defer_prop.rb

Constant Summary collapse

DEFAULT_GROUP =
'default'

Instance Attribute Summary collapse

Attributes included from PropOnceable

#once_expires_in, #once_key

Attributes included from PropMergeable

#appends_at_paths, #match_on, #prepends_at_paths

Instance Method Summary collapse

Methods included from PropOnceable

#expires_at, #fresh?, #once?

Methods included from PropMergeable

#appends_at_root?, #deep_merge?, #merge?, #merges_at_root?, #prepends_at_root?

Methods inherited from BaseProp

#call

Constructor Details

#initialize(**props, &block) ⇒ DeferProp

Returns a new instance of DeferProp.



12
13
14
15
16
# File 'lib/inertia_rails/defer_prop.rb', line 12

def initialize(**props, &block)
  super(&block)

  @group = props[:group] || DEFAULT_GROUP
end

Instance Attribute Details

#groupObject (readonly)

Returns the value of attribute group.



10
11
12
# File 'lib/inertia_rails/defer_prop.rb', line 10

def group
  @group
end