Class: Avm::Entries::Base::UriComponentEntryValue::InheritedValue

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/entries/base/uri_component_entry_value/inherited_value.rb

Instance Method Summary collapse

Instance Method Details

#inherited_value_blockObject



25
26
27
28
29
# File 'lib/avm/entries/base/uri_component_entry_value/inherited_value.rb', line 25

def inherited_value_block
  return nil unless entries_provider.respond_to?(inherited_value_block_method_name)

  ->(value) { entries_provider.send(inherited_value_block_method_name, value) }
end

#inherited_value_block_method_nameObject



31
32
33
# File 'lib/avm/entries/base/uri_component_entry_value/inherited_value.rb', line 31

def inherited_value_block_method_name
  "#{component_entry_path.parts.join('_').variableize}_inherited_value_proc".to_sym
end

#resultObject



17
18
19
20
21
22
23
# File 'lib/avm/entries/base/uri_component_entry_value/inherited_value.rb', line 17

def result
  entries_provider.inherited_entry_value(
    id_entry_path.to_string,
    component_entry_path.to_string,
    &inherited_value_block
  )
end