Class: Holistic::Ruby::Scope::Location::Collection
- Inherits:
-
Object
- Object
- Holistic::Ruby::Scope::Location::Collection
- Defined in:
- lib/holistic/ruby/scope/location.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#scope_name ⇒ Object
readonly
Returns the value of attribute scope_name.
Instance Method Summary collapse
-
#initialize(scope_name) ⇒ Collection
constructor
A new instance of Collection.
- #main ⇒ Object
Constructor Details
#initialize(scope_name) ⇒ Collection
Returns a new instance of Collection.
8 9 10 11 |
# File 'lib/holistic/ruby/scope/location.rb', line 8 def initialize(scope_name) @scope_name = scope_name @items = [] end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
6 7 8 |
# File 'lib/holistic/ruby/scope/location.rb', line 6 def items @items end |
#scope_name ⇒ Object (readonly)
Returns the value of attribute scope_name.
6 7 8 |
# File 'lib/holistic/ruby/scope/location.rb', line 6 def scope_name @scope_name end |
Instance Method Details
#main ⇒ Object
13 14 15 |
# File 'lib/holistic/ruby/scope/location.rb', line 13 def main location_matching_scope_name || items.first end |