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

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

Instance Method Summary collapse

Instance Method Details

#abstractObject



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

def abstract
  @abstract = true
end

#abstract?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'foobara-0.1.7/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 16

def abstract?
  @abstract
end

#domainObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'foobara-0.1.7/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 24

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



44
45
46
# File 'foobara-0.1.7/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 44

def full_command_name
  scoped_full_name
end

#full_command_symbolObject



48
49
50
# File 'foobara-0.1.7/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 48

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

#organizationObject

TODO: prefix these…



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

def organization
  domain.foobara_organization
end

#type_for_declarationObject



20
21
22
# File 'foobara-0.1.7/projects/command/src/command_pattern_implementation/concerns/namespace.rb', line 20

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