Sha256: 0b40bc63688e44e1740ce2e4ef6bc684f3d4b6dba78e37a7fbab2e30197e7ceb

Contents?: true

Size: 686 Bytes

Versions: 205

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module Avm
  module ApplicationStereotypes
    class Base
      enable_listable
      lists.add_symbol :resource, :instance, :source, :source_generator
      common_constructor :namespace_module, :resources do
        self.resources = self.class.lists.resource.hash_keys_validate!(resources)
      end

      # @return [String]
      def name
        namespace_module.name.demodulize
      end

      # @return [String]
      def to_s
        name
      end

      lists.resource.each_value do |resource|
        define_method "#{resource}_class" do
          resources[resource]
        end
      end
    end
  end
end

Version data entries

205 entries across 205 versions & 2 rubygems

Version Path
avm-0.94.1 lib/avm/application_stereotypes/base.rb
eac_tools-0.98.0 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.94.0 lib/avm/application_stereotypes/base.rb
eac_tools-0.94.0 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.93.0 lib/avm/application_stereotypes/base.rb
eac_tools-0.92.0 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.92.0 lib/avm/application_stereotypes/base.rb
eac_tools-0.91.0 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.90.1 lib/avm/application_stereotypes/base.rb
eac_tools-0.87.1 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.90.0 lib/avm/application_stereotypes/base.rb
eac_tools-0.87.0 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.89.0 lib/avm/application_stereotypes/base.rb
eac_tools-0.86.12 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.88.0 lib/avm/application_stereotypes/base.rb
eac_tools-0.86.11 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.87.0 lib/avm/application_stereotypes/base.rb
eac_tools-0.86.8 sub/avm/lib/avm/application_stereotypes/base.rb
avm-0.86.2 lib/avm/application_stereotypes/base.rb
eac_tools-0.86.7 sub/avm/lib/avm/application_stereotypes/base.rb