Class: Tracking::EstimateTracking

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/trello_effort_tracker/tracking/estimate_tracking.rb

Constant Summary

Constants included from Base

Base::DATE_REGEXP, Base::DURATION_REGEXP, Base::TIME_CONVERTERS

Instance Method Summary collapse

Methods included from Base

#date, #initialize, #to_s

Methods included from TrelloConfiguration

#authorization_params_from_config_file, #tracker_username

Instance Method Details

#add_to(card) ⇒ Object



12
13
14
# File 'lib/trello_effort_tracker/tracking/estimate_tracking.rb', line 12

def add_to(card)
  card.estimates << estimate unless card.contains_estimate?(estimate)
end

#estimateObject

TODO: rename to ‘amount’ ? TODO: avoid recomputing estimate every time using a lazy instance variable



7
8
9
10
# File 'lib/trello_effort_tracker/tracking/estimate_tracking.rb', line 7

def estimate
  estimate = convert_to_hours(raw_estimate)
  Estimate.new(amount: estimate, date: date, tracking_notification_id: tracking_notification.id)
end