Module: Foobara::CommandPatternImplementation::Concerns::Namespace::ClassMethods

Defined in:
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/namespace.rb

Instance Method Summary collapse

Instance Method Details

#domainObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 16

def domain
  namespace = foobara_parent_namespace

  while namespace
    if namespace.is_a?(Module) && namespace.foobara_domain?
      d = namespace
      break
    end

    namespace = namespace.foobara_parent_namespace
  end

  d || GlobalDomain
end

#full_command_nameObject



36
37
38
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 36

def full_command_name
  scoped_full_name
end

#full_command_symbolObject



40
41
42
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 40

def full_command_symbol
  @full_command_symbol ||= Util.underscore_sym(full_command_name)
end

#organizationObject

TODO: prefix these…



32
33
34
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 32

def organization
  domain.foobara_organization
end

#type_for_declarationObject



12
13
14
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 12

def type_for_declaration(...)
  domain.foobara_type_from_declaration(...)
end