Sha256: 73ac73106a183e3176cdbaa511f60f42b89f6bbbafc9a36bc5c4236f3b15c37d

Contents?: true

Size: 1.04 KB

Versions: 76

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

require 'avm/instances/entry'
require 'avm/instances/entry_keys'

module Avm
  module Instances
    class Base
      module AutoValues
        module Mailer
          ::Avm::Instances::EntryKeys.all.select { |c| c.to_s.start_with?('mailer.') }
                                     .reject { |c| c == ::Avm::Instances::EntryKeys::MAILER_ID }
                                     .each do |mailer_key|
            define_method ::Avm::Instances::Entry.auto_value_method_name(mailer_key) do
              mailer_auto_common(mailer_key)
            end
          end

          def auto_mailer_id
            inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
                                  ::Avm::Instances::EntryKeys::MAILER_ID) ||
              read_entry_optional(::Avm::Instances::EntryKeys::HOST_ID)
          end

          private

          def mailer_auto_common(mailer_key)
            inherited_entry_value(::Avm::Instances::EntryKeys::MAILER_ID, mailer_key)
          end
        end
      end
    end
  end
end

Version data entries

76 entries across 76 versions & 2 rubygems

Version Path
avm-0.18.0 lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.116.1 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.116.0 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-0.17.0 lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.115.0 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-0.16.0 lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.114.2 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-0.15.0 lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.114.1 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.114.0 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.113.6 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-0.14.0 lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.113.5 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-0.13.0 lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.113.4 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-0.12.1 lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.113.3 sub/avm/lib/avm/instances/base/auto_values/mailer.rb
avm-0.12.0 lib/avm/instances/base/auto_values/mailer.rb
avm-0.11.0 lib/avm/instances/base/auto_values/mailer.rb
avm-tools-0.113.2 sub/avm/lib/avm/instances/base/auto_values/mailer.rb