Sha256: 485a087b8aed770c48430c0361bb8539ebf6577eead7bbb35413b26ed312828a

Contents?: true

Size: 774 Bytes

Versions: 188

Compression:

Stored size: 774 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module Avm
  module With
    module ApplicationStereotype
      common_concern

      module ClassMethods
        # @return [Avm::ApplicationStereotype::Base]
        def application_stereotype
          @application_stereotype ||=
            ::Avm::Registry.application_stereotypes.detect(application_stereotype_name)
        end

        # @return [String]
        def application_stereotype_name
          stereotype_namespace_module.name.demodulize
        end

        # @return [Module]
        def stereotype_namespace_module
          module_parent.module_parent
        end
      end

      def stereotype_namespace_module
        self.class.stereotype_namespace_module
      end
    end
  end
end

Version data entries

188 entries across 188 versions & 2 rubygems

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