Class: InertiaRails::MergeProp

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseProp

#call

Constructor Details

#initialize(deep_merge: false, match_on: nil, &block) ⇒ MergeProp

Returns a new instance of MergeProp.



7
8
9
10
11
# File 'lib/inertia_rails/merge_prop.rb', line 7

def initialize(deep_merge: false, match_on: nil, &block)
  super(&block)
  @deep_merge = deep_merge
  @match_on = match_on.nil? ? nil : Array(match_on)
end

Instance Attribute Details

#match_onObject (readonly)

Returns the value of attribute match_on.



5
6
7
# File 'lib/inertia_rails/merge_prop.rb', line 5

def match_on
  @match_on
end

Instance Method Details

#deep_merge?Boolean

Returns:

  • (Boolean)


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

def deep_merge?
  @deep_merge
end

#merge?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/inertia_rails/merge_prop.rb', line 13

def merge?
  true
end