Sha256: 0f219d4db43b553eb5734274349e052decbaaafce6f697faf6701614bd1140d6

Contents?: true

Size: 506 Bytes

Versions: 2

Compression:

Stored size: 506 Bytes

Contents

#!/usr/bin/env ruby

# frozen_string_literal: true

require_relative 'sections'

module Checkoff
  # Pull things from 'my tasks' in Asana
  class Tasks
    MINUTE = 60
    HOUR = MINUTE * 60
    DAY = 24 * HOUR
    REALLY_LONG_CACHE_TIME = HOUR
    LONG_CACHE_TIME = MINUTE * 15
    SHORT_CACHE_TIME = MINUTE * 5

    def initialize(sections: Checkoff::Sections.new)
      @sections = sections
    end

    def tasks_minus_sections(tasks)
      @sections.by_section(tasks).values.flatten
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
checkoff-0.1.4 lib/checkoff/tasks.rb
checkoff-0.1.3 lib/checkoff/tasks.rb