Sha256: baac958e734197848917b4d6071af0bb94cdea7e8659059e63f49cf9fd3d4ab9
Contents?: true
Size: 617 Bytes
Versions: 74
Compression:
Stored size: 617 Bytes
Contents
module Jets class Router class Scope attr_reader :options, :parent, :level def initialize(options = {}, parent = nil, level = 1) @options = options @parent = parent @level = level end def root? @parent.nil? end def new(options={}) self.class.new(options, self, level + 1) end def full_namespace ns = [] current = self while current ns.unshift(current.options[:namespace]) current = current.parent end ns.empty? ? nil : ns.join('/') end end end end
Version data entries
74 entries across 74 versions & 3 rubygems