Class: RuboCop::Cop::Rails::TimeZoneToday

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/rails/time_zone_today.rb

Constant Summary collapse

MSG =
'Do not use Time.zone.today.'
RESTRICT_ON_SEND =
[:today].freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



16
17
18
19
20
# File 'lib/rubocop/cop/rails/time_zone_today.rb', line 16

def on_send(node)
  return unless time_zone_today_usage(node)

  add_offense(node)
end