Class: Ruboty::Handlers::Timecard

Inherits:
Base
  • Object
show all
Defined in:
lib/ruboty/handlers/timecard.rb

Constant Summary collapse

DATE_FORMAT =
"%Y/%m/%d"
DATETIME_FORMAT =
"%H:%M"
SEPARATOR =
" ~ "

Instance Method Summary collapse

Instance Method Details

#punch(message) ⇒ Object



12
13
14
15
16
17
# File 'lib/ruboty/handlers/timecard.rb', line 12

def punch(message)
  @member = message.from_name || "Anonymous"
  storage[member_row, member_column] = @member
  storage[date_row, date_column] = today_timestamp
  storage[date_row, member_column] = timestamp
end