Sha256: ef6c2913aba935538df49c6d8f916ab87785c524e6b21a32580fd5d61cf62d4b
Contents?: true
Size: 806 Bytes
Versions: 13
Compression:
Stored size: 806 Bytes
Contents
module Rubrowser module Parser module Definition class Base attr_reader :namespace, :file, :line, :lines def initialize(namespace, file: nil, line: nil, lines: 0) @namespace = Array(namespace) @file = file @line = line @lines = lines @circular = false end def name namespace.last end def parent new(namespace[0...-1]) end def kernel? namespace.empty? end def circular? @circular end def set_circular @circular = true end def ==(other) namespace == other.namespace end def to_s namespace.join('::') end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems