Method: HackTree::Node::Base#global_name
- Defined in:
- lib/hack_tree/node/base.rb
#global_name ⇒ Object
global_name # => “hello”
global_name # => "rails.db.tables"
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/hack_tree/node/base.rb', line 22 def global_name pcs = [] cursor = self begin pcs << cursor.name cursor = cursor.parent end while cursor pcs.reverse.join(".") end |