Module: Fetching::FetchingArray::ArrayMethods
- Included in:
- Fetching::FetchingArray
- Defined in:
- lib/fetching/fetching_array.rb
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #length ⇒ Object (also: #size)
- #reverse ⇒ Object
- #shuffle(*args) ⇒ Object
- #sort(&block) ⇒ Object
- #sort_by(&block) ⇒ Object
- #values_at(*args) ⇒ Object
Instance Method Details
#empty? ⇒ Boolean
22 23 24 |
# File 'lib/fetching/fetching_array.rb', line 22 def empty? @table.empty? end |
#length ⇒ Object Also known as: size
26 27 28 |
# File 'lib/fetching/fetching_array.rb', line 26 def length @table.length end |
#reverse ⇒ Object
31 32 33 |
# File 'lib/fetching/fetching_array.rb', line 31 def reverse Fetching.from @table.reverse end |
#shuffle(*args) ⇒ Object
35 36 37 |
# File 'lib/fetching/fetching_array.rb', line 35 def shuffle *args Fetching.from @table.shuffle(*args) end |
#sort(&block) ⇒ Object
39 40 41 |
# File 'lib/fetching/fetching_array.rb', line 39 def sort &block Fetching.from @table.sort(&block) end |