Class: Artisan::Activity::Formatters::Temporal
- Inherits:
-
Object
- Object
- Artisan::Activity::Formatters::Temporal
- Defined in:
- lib/artisan/activity/formatters/temporal.rb
Instance Method Summary collapse
- #date ⇒ Object
-
#initialize(change) ⇒ Temporal
constructor
A new instance of Temporal.
- #time ⇒ Object
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
#date ⇒ Object
10 11 12 |
# File 'lib/artisan/activity/formatters/temporal.rb', line 10 def date return @change.created_at.strftime("%m/%d/%Y") end |
#time ⇒ Object
14 15 16 |
# File 'lib/artisan/activity/formatters/temporal.rb', line 14 def time return @change.created_at.strftime("%I:%M:%S %p") end |