Sha256: 1233a8b6068161d79388b9d9047acdeb830aea832c4bb12e885ceae5c834b8ce
Contents?: true
Size: 534 Bytes
Versions: 3
Compression:
Stored size: 534 Bytes
Contents
module Notifaction class Utils def self.formatted_time(time = nil) if time.nil? time = Time.now end time.strftime("%e/%-m/%Y @ %I:%M:%S%P") end def self.os host_os = RbConfig::CONFIG['host_os'] case host_os when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ :windows when /darwin|mac os/ :macosx when /linux/ :linux when /solaris|bsd/ :unix else puts "unknown os: #{host_os.inspect}" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
notifaction-0.4.0 | lib/notifaction/utils.rb |
notifaction-0.3.0.1 | lib/notifaction/utils.rb |
notifaction-0.3.0 | lib/notifaction/utils.rb |