Class: Orbacle::GlobalTree::Constant
- Inherits:
-
Object
- Object
- Orbacle::GlobalTree::Constant
- Defined in:
- lib/orbacle/global_tree.rb
Instance Attribute Summary collapse
-
#definition_id ⇒ Object
readonly
Returns the value of attribute definition_id.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #full_name ⇒ Object
-
#initialize(name, scope, location, definition_id = nil) ⇒ Constant
constructor
A new instance of Constant.
Constructor Details
#initialize(name, scope, location, definition_id = nil) ⇒ Constant
Returns a new instance of Constant.
70 71 72 73 74 75 |
# File 'lib/orbacle/global_tree.rb', line 70 def initialize(name, scope, location, definition_id = nil) @name = name @scope = scope @location = location @definition_id = definition_id end |
Instance Attribute Details
#definition_id ⇒ Object (readonly)
Returns the value of attribute definition_id.
77 78 79 |
# File 'lib/orbacle/global_tree.rb', line 77 def definition_id @definition_id end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
77 78 79 |
# File 'lib/orbacle/global_tree.rb', line 77 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
77 78 79 |
# File 'lib/orbacle/global_tree.rb', line 77 def name @name end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
77 78 79 |
# File 'lib/orbacle/global_tree.rb', line 77 def scope @scope end |
Instance Method Details
#==(other) ⇒ Object
79 80 81 82 83 84 |
# File 'lib/orbacle/global_tree.rb', line 79 def ==(other) @name == other.name && @scope == other.scope && @location == other.location && @definition_id == other.definition_id end |
#full_name ⇒ Object
86 87 88 |
# File 'lib/orbacle/global_tree.rb', line 86 def full_name [*scope.elems, @name].join("::") end |