class Pello::Card

Constants

NAME_REGEX

Attributes

trello_card[RW]

Public Class Methods

new(trello_card) click to toggle source
# File lib/pello/card.rb, line 12
def initialize(trello_card)
  @trello_card = trello_card
end

Public Instance Methods

extract_name() click to toggle source
# File lib/pello/card.rb, line 22
def extract_name
  name.match(NAME_REGEX)[-1]
end
extract_points() click to toggle source
# File lib/pello/card.rb, line 26
def extract_points
  points = name.match(NAME_REGEX)[2]
  points ||= 0
  points.to_f
end
extract_pomodori() click to toggle source
# File lib/pello/card.rb, line 16
def extract_pomodori
  pomos = name.match(NAME_REGEX)[3]
  pomos ||= 0
  pomos.to_i
end