Sha256: 6713f40d8fdf5d142d6996706a4740d695f43598753e12eadcca4a3c63dd60e5

Contents?: true

Size: 975 Bytes

Versions: 8

Compression:

Stored size: 975 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 detached_entities
        @detached_entities ||= types.select(&:detached_entity?)
      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

8 entries across 8 versions & 1 rubygems

Version Path
foobara-0.0.38 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.37 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.36 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.35 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.34 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.33 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.32 projects/manifest/src/foobara/manifest/domain.rb
foobara-0.0.31 projects/manifest/src/foobara/manifest/domain.rb