class Orbacle::ConstName
Attributes
elems[R]
Public Class Methods
from_string(str)
click to toggle source
# File lib/orbacle/const_name.rb, line 5 def self.from_string(str) raise ArgumentError if str.start_with?("::") new(str.split("::")) end
new(elems)
click to toggle source
# File lib/orbacle/const_name.rb, line 10 def initialize(elems) @elems = elems raise ArgumentError if elems.empty? end
Public Instance Methods
==(other)
click to toggle source
# File lib/orbacle/const_name.rb, line 17 def ==(other) elems == other.elems end
name()
click to toggle source
# File lib/orbacle/const_name.rb, line 21 def name elems.last end
scope()
click to toggle source
# File lib/orbacle/const_name.rb, line 29 def scope Scope.new(elems[0..-2], false) end
to_string()
click to toggle source
# File lib/orbacle/const_name.rb, line 25 def to_string elems.join("::") end