Class: Foobara::Manifest::Domain

Inherits:
BaseManifest show all
Defined in:
foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb

Constant Summary

Constants included from TruncatedInspect

TruncatedInspect::MAX_LENGTH

Instance Attribute Summary

Attributes inherited from BaseManifest

#path, #root_manifest

Instance Method Summary collapse

Methods inherited from BaseManifest

#==, #[], category_to_manifest_class, #domain, #eql?, #find_type, #global_domain, #global_organization, #hash, #initialize, #key?, #method_missing, optional_key, #optional_key?, optional_key_defaults, optional_keys, #organization, #parent, #parent_category, #parent_name, #relevant_manifest, #respond_to_missing?, #scoped_category

Methods included from TruncatedInspect

#inspect, truncating

Constructor Details

This class inherits a constructor from Foobara::Manifest::BaseManifest

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Foobara::Manifest::BaseManifest

Instance Method Details

#commandsObject



10
11
12
13
14
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 10

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

#detached_entitiesObject



22
23
24
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 22

def detached_entities
  @detached_entities ||= models.select(&:detached_entity?)
end

#domain_manifestObject



6
7
8
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 6

def domain_manifest
  relevant_manifest
end

#domain_nameObject



38
39
40
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 38

def domain_name
  scoped_name
end

#entitiesObject



26
27
28
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 26

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

#full_domain_nameObject



42
43
44
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 42

def full_domain_name
  scoped_full_name
end

#global?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 34

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

#modelsObject



30
31
32
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 30

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

#typesObject



16
17
18
19
20
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/domain.rb', line 16

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