Method: ExternalIndex#values_at
- Defined in:
- lib/external_index.rb
#values_at(*selectors) ⇒ Object
Returns a copy of self containing the entries corresponding to the given selector(s). The selectors may be either integer indices or ranges.
potentially expensive
771 772 773 774 775 776 777 778 |
# File 'lib/external_index.rb', line 771 def values_at(*selectors) another = self.another selectors.each do |s| entries = self[s] another << (entries == nil ? nil_value : entries.flatten) end another end |