Module: MugenHelper

Defined in:
lib/generators/mugen/templates/app/helpers/mugen_helper.rb

Instance Method Summary collapse

Instance Method Details

#d(timestamp) ⇒ Object



2
3
4
5
6
# File 'lib/generators/mugen/templates/app/helpers/mugen_helper.rb', line 2

def d(timestamp)
  if timestamp
    Time.at(timestamp).to_s(:short)
  end
end

#eta(timestamp) ⇒ Object



8
9
10
# File 'lib/generators/mugen/templates/app/helpers/mugen_helper.rb', line 8

def eta(timestamp)    
  time_ago_in_words(Time.at(timestamp)) unless timestamp.empty?
end