Class: Avm::Entries::Base::UriComponentsEntriesValues::GenericComponent
- Inherits:
-
Object
- Object
- Avm::Entries::Base::UriComponentsEntriesValues::GenericComponent
show all
- Defined in:
- lib/avm/entries/base/uri_components_entries_values/generic_component.rb
Instance Method Summary
collapse
Instance Method Details
#define_auto_method ⇒ Object
17
18
19
20
21
22
|
# File 'lib/avm/entries/base/uri_components_entries_values/generic_component.rb', line 17
def define_auto_method
outer_self = self
entries_provider_class.define_method(auto_method_name) do
uri_component_entry_value(outer_self.entry_key_path.to_string)
end
end
|
#define_get_method ⇒ Object
24
25
26
27
28
29
|
# File 'lib/avm/entries/base/uri_components_entries_values/generic_component.rb', line 24
def define_get_method
outer_self = self
entries_provider_class.define_method(get_method_name) do
read_entry(outer_self.entry_key_path.to_string)
end
end
|
#define_get_optional_method ⇒ Object
31
32
33
34
35
36
|
# File 'lib/avm/entries/base/uri_components_entries_values/generic_component.rb', line 31
def define_get_optional_method
outer_self = self
entries_provider_class.define_method(get_optional_method_name) do
read_entry_optional(outer_self.entry_key_path.to_string)
end
end
|
#define_inherited_value_proc_method(&block) ⇒ Object
38
39
40
|
# File 'lib/avm/entries/base/uri_components_entries_values/generic_component.rb', line 38
def define_inherited_value_proc_method(&block)
entries_provider_class.define_method(inherited_value_proc_name, &block)
end
|
#entry_key_path ⇒ Object
42
43
44
|
# File 'lib/avm/entries/base/uri_components_entries_values/generic_component.rb', line 42
def entry_key_path
::EacConfig::EntryPath.assert([prefix, component])
end
|
#id_component ⇒ Object
46
47
48
|
# File 'lib/avm/entries/base/uri_components_entries_values/generic_component.rb', line 46
def id_component
@id_component ||= owner.component_factory('id')
end
|
#inherited_value_proc_name ⇒ Object
50
51
52
|
# File 'lib/avm/entries/base/uri_components_entries_values/generic_component.rb', line 50
def inherited_value_proc_name
entry_key_path.inherited_block_method_name
end
|
#setup ⇒ Object
54
55
56
57
58
|
# File 'lib/avm/entries/base/uri_components_entries_values/generic_component.rb', line 54
def setup
define_auto_method
define_get_method
define_get_optional_method
end
|