Sha256: b7054743c3bba78f0119431029d946bde524f1e253bc47d7c6270bca441cc090

Contents?: true

Size: 1.08 KB

Versions: 41

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require 'avm/entries/uri_builder'
require 'eac_config/entry_path'
require 'eac_ruby_utils/core_ext'

module Avm
  module Entries
    module Base
      class UriComponentEntryValue
        class InheritedValue
          enable_method_class
          common_constructor :uri_component_entry_value
          delegate :entries_provider, :id_entry_path, :component_entry_path,
                   to: :uri_component_entry_value

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

          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

          # @return [Symbol]
          def inherited_value_block_method_name
            component_entry_path.inherited_block_method_name
          end
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
avm-0.94.0 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.94.0 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.93.0 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.92.0 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.92.0 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.91.0 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.90.1 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.87.1 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.90.0 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.87.0 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.89.0 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.86.12 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.88.0 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.86.11 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.87.0 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.86.8 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.86.2 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.86.7 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
avm-0.86.1 lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
eac_tools-0.86.5 sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb