Module: Tally::Keyable

Extended by:
ActiveSupport::Concern
Included in:
Increment
Defined in:
lib/tally/keyable.rb

Instance Method Summary collapse

Instance Method Details

#dayObject



18
19
20
# File 'lib/tally/keyable.rb', line 18

def day
  @day ||= Time.current.utc.to_date
end

#initialize(key, record = nil) ⇒ Object



13
14
15
16
# File 'lib/tally/keyable.rb', line 13

def initialize(key, record = nil)
  @key = key.to_s.gsub(":", ".").downcase.strip
  @record = record
end