Sha256: 643ba767f6f28d9db8ac2b6a79002a186d3d007ff627f321939755935bec6172

Contents?: true

Size: 605 Bytes

Versions: 2

Compression:

Stored size: 605 Bytes

Contents

require 'time_distribution/smart_duration'

module TimeDistribution
  class Task
    attr_reader :subject, :time_taken, :desc

    # @param [#to_s] subject The subject on which the task was completed. E.g. A course or project.
    # @param [#to_s] time_taken The amount of time taken on the task (Compatible with +ChronicDuration+ parsing, or a range of times that conform to +Chronic+ parsing).
    # @param [#to_s] desc The task's description.
    def initialize(subject, time_taken, desc)
      @subject = subject
      @time_taken = SmartDuration.parse(time_taken)
      @desc = desc
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
time_distribution-1.1.0 lib/time_distribution/task.rb
time_distribution-1.0.0 lib/time_distribution/task.rb