Sha256: 52c8ea54c19db4f43512969580353b1705c6e8aad20db7c98d53eefa11e65585

Contents?: true

Size: 634 Bytes

Versions: 2

Compression:

Stored size: 634 Bytes

Contents

# frozen-string-literal: true

module SleeperRb
  module Resources
    ##
    # Implements {SleeperRb::Utilities::ArrayProxy} and wraps Draft objects.
    class DraftArray < SleeperRb::Utilities::ArrayProxy
      ##
      # Returns all auction drafts.
      #
      # @return [{SleeperRb::Resources::DraftArray}[rdoc-ref:SleeperRb::Resources::DraftArray]]
      def auction
        where(auction?: true)
      end

      ##
      # Returns all snake drafts.
      #
      # @return [{SleeperRb::Resources::DraftArray}[rdoc-ref:SleeperRb::Resources::DraftArray]]
      def snake
        where(snake?: true)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sleeper_rb-0.2.1 lib/sleeper_rb/resources/draft_array.rb
sleeper_rb-0.2.0 lib/sleeper_rb/resources/draft_array.rb