Class: Artisan::Activity::Formatters::Temporal

Inherits:
Object
  • Object
show all
Defined in:
lib/artisan/activity/formatters/temporal.rb

Instance Method Summary collapse

Constructor Details

#initialize(change) ⇒ Temporal

Returns a new instance of Temporal.



6
7
8
# File 'lib/artisan/activity/formatters/temporal.rb', line 6

def initialize(change)
  @change = change
end

Instance Method Details

#dateObject



10
11
12
# File 'lib/artisan/activity/formatters/temporal.rb', line 10

def date
  return @change.created_at.strftime("%m/%d/%Y")
end

#timeObject



14
15
16
# File 'lib/artisan/activity/formatters/temporal.rb', line 14

def time
  return @change.created_at.strftime("%I:%M:%S %p")
end