Class: Foobara::Manifest::Domain
  
  
  
  
  
    - Inherits:
 
    - 
      BaseManifest
      
        
        show all
      
    
 
  
  
  
  
  
  
  
  
  
  
    - Defined in:
 
    - foobara-0.2.2/projects/manifest/src/foobara/manifest/domain.rb
 
  
  
 
  Constant Summary
  
  
  TruncatedInspect::MAX_LENGTH
  Instance Attribute Summary
  
  Attributes inherited from BaseManifest
  #path, #root_manifest
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  #==, #[], 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, #symbol_path
  
  
  
  
  
  
  
  
  
  #inspect, truncating
  
    Instance Method Details
    
      
  
  
    #commands  ⇒ Object 
  
  
  
  
    
      
10
11
12
13
14 
     | 
    
      # File 'foobara-0.2.2/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_entities  ⇒ Object 
  
  
  
  
    
      
22
23
24 
     | 
    
      # File 'foobara-0.2.2/projects/manifest/src/foobara/manifest/domain.rb', line 22
def detached_entities
  @detached_entities ||= models.select(&:detached_entity?)
end 
     | 
  
 
    
      
  
  
    #domain_manifest  ⇒ Object 
  
  
  
  
    
      
6
7
8 
     | 
    
      # File 'foobara-0.2.2/projects/manifest/src/foobara/manifest/domain.rb', line 6
def domain_manifest
  relevant_manifest
end 
     | 
  
 
    
      
  
  
    #domain_name  ⇒ Object 
  
  
  
  
    
      
38
39
40 
     | 
    
      # File 'foobara-0.2.2/projects/manifest/src/foobara/manifest/domain.rb', line 38
def domain_name
  scoped_name
end 
     | 
  
 
    
      
  
  
    #entities  ⇒ Object 
  
  
  
  
    
      
26
27
28 
     | 
    
      # File 'foobara-0.2.2/projects/manifest/src/foobara/manifest/domain.rb', line 26
def entities
  @entities ||= detached_entities.select(&:entity?)
end 
     | 
  
 
    
      
  
  
    #full_domain_name  ⇒ Object 
  
  
  
  
    
      
42
43
44 
     | 
    
      # File 'foobara-0.2.2/projects/manifest/src/foobara/manifest/domain.rb', line 42
def full_domain_name
  scoped_full_name
end 
     | 
  
 
    
      
  
  
    #global?  ⇒ Boolean 
  
  
  
  
    
      
34
35
36 
     | 
    
      # File 'foobara-0.2.2/projects/manifest/src/foobara/manifest/domain.rb', line 34
def global?
  reference == "global_organization::global_domain"
end 
     | 
  
 
    
      
  
  
    #models  ⇒ Object 
  
  
  
  
    
      
30
31
32 
     | 
    
      # File 'foobara-0.2.2/projects/manifest/src/foobara/manifest/domain.rb', line 30
def models
  @models ||= types.select(&:model?).reject(&:builtin?)
end 
     | 
  
 
    
      
  
  
    #types  ⇒ Object 
  
  
  
  
    
      
16
17
18
19
20 
     | 
    
      # File 'foobara-0.2.2/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
     |