Module: DK::TQueue

Included in:
Client
Defined in:
lib/draftking/queue.rb

Overview

—————————– Queue Methods —————————– #

Instance Method Summary collapse

Instance Method Details

#move_to_drafts(options) ⇒ Int

Move from Queue to Drafts

Parameters:

  • options (:filter)
    String

    Modify posts not containing :filter

Returns:

  • (Int)

    Number of modified posts



7
8
9
10
11
12
13
14
# File 'lib/draftking/queue.rb', line 7

def move_to_drafts(options)
  options[:message] = 'Moving Queue ~> Drafts: '
  options[:shuffle] = false
  options[:state]   = DK::DRAFT
  post_operation(options) do |post, _|
    !post.passes_filter?(filter: @filter)
  end
end