==(other)
click to toggle source
def ==(other)
other.is_a?(self.class) && other.namespace == namespace && other.name == name
end
absolute!()
click to toggle source
def absolute!
self.class.new(namespace: namespace.absolute!, name: name)
end
absolute?()
click to toggle source
def absolute?
namespace.absolute?
end
alias?()
click to toggle source
def alias?
kind == :alias
end
class?()
click to toggle source
def class?
kind == :class
end
eql?(other)
click to toggle source
hash()
click to toggle source
def hash
self.class.hash ^ namespace.hash ^ name.hash
end
interface?()
click to toggle source
def interface?
kind == :interface
end
relative!()
click to toggle source
def relative!
self.class.new(namespace: namespace.relative!, name: name)
end
to_json(*a)
click to toggle source
def to_json(*a)
to_s.to_json(*a)
end
to_namespace()
click to toggle source
def to_namespace
namespace.append(self.name)
end
to_s()
click to toggle source
def to_s
"#{namespace.to_s}#{name}"
end
with_prefix(namespace)
click to toggle source
def with_prefix(namespace)
self.class.new(namespace: namespace + self.namespace, name: name)
end