class Ruby::Pomodoro::Tasks::Entity
Attributes
id[R]
name[R]
pomodors[R]
spent_time[R]
Public Class Methods
new(name:, spent_time: 0, id: nil)
click to toggle source
# File lib/ruby/pomodoro/tasks/entity.rb, line 7 def initialize(name:, spent_time: 0, id: nil) @name = name @spent_time = spent_time @pomodors = 0 @id = id end
Public Instance Methods
add_pomodoro()
click to toggle source
@return [Integer]
# File lib/ruby/pomodoro/tasks/entity.rb, line 15 def add_pomodoro @pomodors += 1 end
track(seconds)
click to toggle source
@param [Integer] seconds @return [Integer]
# File lib/ruby/pomodoro/tasks/entity.rb, line 21 def track(seconds) @spent_time += seconds end