Sha256: a9729d2695485f06c694f380973b300d9c335aa708028b71394592e90f5e1b4c
Contents?: true
Size: 1.51 KB
Versions: 4
Compression:
Stored size: 1.51 KB
Contents
# frozen_string_literal: true require 'avm/entries/uri_builder' require 'avm/instances/entry_keys' module Avm module Instances class Base module AutoValues module Install def auto_install_data_path uri_component_entry_value( ::Avm::Instances::EntryKeys::INSTALL_DATA_PATH, inherited_value_block: ->(v) { v + '/' + id } ) end def auto_install_groupname uri_component_entry_value( ::Avm::Instances::EntryKeys::INSTALL_GROUPNAME, default_value: lambda do read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME) end ) end ::Avm::Entries::UriBuilder::ENTRIES_FIELDS.each do |component| method_suffix = "install_#{component}" define_method "auto_#{method_suffix}" do uri_component_entry_value( ::Avm::Instances::EntryKeys.const_get(method_suffix.underscore.upcase) ) end end def auto_install_url inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, ::Avm::Instances::EntryKeys::INSTALL_URL) || auto_install_url_by_parts end def auto_install_url_by_parts require 'avm/entries/auto_values/uri_entry' ::Avm::Entries::AutoValues::UriEntry.new(self, 'install').value end end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems