Sha256: fbbdbb63d366b53306d151c6cef0cd3df64fd9eca949ab59030d354a0f4064c7
Contents?: true
Size: 1.05 KB
Versions: 26
Compression:
Stored size: 1.05 KB
Contents
module Foobara class Namespace # 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 # 2. direct: only this namespace. we want to know what this namespace directly owns # children: n # parent: n # dependent: n # 3. strict # children: n # parent: y # dependent: n # 4. absolute # children: y # parent: n # dependent: n # TODO: don't we have an enumerated class/project for this? module LookupMode GENERAL = :general RELAXED = :relaxed DIRECT = :direct STRICT = :strict ABSOLUTE = :absolute ALL = [GENERAL, RELAXED, DIRECT, STRICT, ABSOLUTE].freeze class << self def validate!(mode) unless ALL.include?(mode) # :nocov: raise ArgumentError, "Expected #{mode} to be one of #{ALL.map(&:inspect).join(",")}" # :nocov: end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems