Module: Sequencescape::Api::FinderMethods::Delegation

Included in:
Associations::HasMany::InlineAssociationProxy
Defined in:
lib/sequencescape-api/finder_methods.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/sequencescape-api/finder_methods.rb', line 5

def self.included(base)
  base.with_options(to: :all) do |all|
    all.delegate :each, :first, :last, :to_a, :size
    all.delegate :empty?, :blank?
    all.delegate :each_page, :first_page, :last_page
  end
end