Module: Foobara::Namespace::LookupMode

Defined in:
foobara-0.0.110/projects/namespace/src/namespace/lookup_mode.rb

Overview

TODO: need to define these better… use-cases

  1. general: just general lookup. find it wherever the heck it might be

children: y
parent: y
dependent: y
  1. direct: only this namespace. we want to know what this namespace directly owns

children: n
parent: n
dependent: n
  1. strict

children: n
parent: y
dependent: n
  1. absolute

children: y
parent: n
dependent: n

TODO: don’t we have an enumerated class/project for this?

Constant Summary collapse

GENERAL =
:general
RELAXED =
:relaxed
DIRECT =
:direct
STRICT =
:strict
ABSOLUTE =
:absolute
ALL =
[GENERAL, RELAXED, DIRECT, STRICT, ABSOLUTE].freeze

Class Method Summary collapse

Class Method Details

.validate!(mode) ⇒ Object



31
32
33
34
35
36
37
# File 'foobara-0.0.110/projects/namespace/src/namespace/lookup_mode.rb', line 31

def validate!(mode)
  unless ALL.include?(mode)
    # :nocov:
    raise ArgumentError, "Expected #{mode} to be one of #{ALL.map(&:inspect).join(",")}"
    # :nocov:
  end
end