Class: Avm::Entries::Base::UriComponentsEntriesValues::UrlComponent

Inherits:
GenericComponent
  • Object
show all
Defined in:
lib/avm/entries/base/uri_components_entries_values/url_component.rb

Instance Method Summary collapse

Methods inherited from GenericComponent

#auto_method_name, #component_method_name, #define_auto_method, #define_inherited_value_proc_method, #entry_key_path, #id_component, #inherited_value_proc_name

Instance Method Details

#auto_install_url_by_parts(entries_provider) ⇒ Object



20
21
22
23
# File 'lib/avm/entries/base/uri_components_entries_values/url_component.rb', line 20

def auto_install_url_by_parts(entries_provider)
  require 'avm/entries/auto_values/uri_entry'
  ::Avm::Entries::AutoValues::UriEntry.new(entries_provider, 'install').value
end

#setupObject



11
12
13
14
15
16
17
18
# File 'lib/avm/entries/base/uri_components_entries_values/url_component.rb', line 11

def setup
  outer_self = self
  define_auto_method do
    inherited_entry_value(outer_self.id_component.entry_key_path.to_string,
                          outer_self.entry_key_path.to_string) ||
      outer_self.auto_install_url_by_parts(self)
  end
end