class Ruby::Pomodoro::Task

Task for [Ruby::Pomodoro::Worker]

Attributes

name[R]
pomodors[R]
spent_time[R]

Public Class Methods

new(name, spent_time: 0) click to toggle source
# File lib/ruby/pomodoro/task.rb, line 7
def initialize(name, spent_time: 0)
  @name = name
  @spent_time = spent_time
  @pomodors = 0
end

Public Instance Methods

add_pomodoro() click to toggle source

@return [Integer]

# File lib/ruby/pomodoro/task.rb, line 14
def add_pomodoro
  @pomodors += 1
end
track(seconds) click to toggle source

@param [Integer] seconds @return [Integer]

# File lib/ruby/pomodoro/task.rb, line 20
def track(seconds)
  @spent_time += seconds
end