Class: Poefy::CoreExtensions::IndexValueArray
- Inherits:
-
Struct
- Object
- Struct
- Poefy::CoreExtensions::IndexValueArray
- Includes:
- Enumerable
- Defined in:
- lib/poefy/core_extensions/array.rb
Overview
Output struct for #by_distance method. Array is the most useful data, but index and value are also kept.
Instance Attribute Summary collapse
-
#array ⇒ Object
(also: #to_a)
Returns the value of attribute array.
-
#index ⇒ Object
Returns the value of attribute index.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#array ⇒ Object Also known as: to_a
Returns the value of attribute array
24 25 26 |
# File 'lib/poefy/core_extensions/array.rb', line 24 def array @array end |
#index ⇒ Object
Returns the value of attribute index
24 25 26 |
# File 'lib/poefy/core_extensions/array.rb', line 24 def index @index end |
#value ⇒ Object
Returns the value of attribute value
24 25 26 |
# File 'lib/poefy/core_extensions/array.rb', line 24 def value @value end |
Instance Method Details
#each(&block) ⇒ Object
27 28 29 30 31 |
# File 'lib/poefy/core_extensions/array.rb', line 27 def each &block array.each do |i| block.call i end end |