Sha256: 87627f1e502b66283b376ceeb516c540a96d4de9c6560bbbfe12c88d1702c810

Contents?: true

Size: 872 Bytes

Versions: 27

Compression:

Stored size: 872 Bytes

Contents

module Foobara
  module Manifest
    class Domain < BaseManifest
      self.category_symbol = :domain

      def domain_manifest
        relevant_manifest
      end

      def commands
        @commands ||= DataPath.value_at(:commands, domain_manifest).map do |key|
          Command.new(root_manifest, [:command, key])
        end
      end

      def types
        @types ||= DataPath.value_at(:types, domain_manifest).map do |key|
          Type.new(root_manifest, [:type, key])
        end
      end

      def entities
        @entities ||= types.select(&:entity?)
      end

      def models
        @models ||= types.select(&:model?)
      end

      def global?
        reference == "global_organization::global_domain"
      end

      def domain_name
        scoped_name
      end

      def full_domain_name
        scoped_full_name
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foobara-0.0.7 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.6 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.5 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.4 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.3 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.2 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.1 projects/manifest/src/foobara/manifest/domain.rb