Sha256: 9caa88a233ceaac199891cb9e1a09eb6ab0509186300d54632d61555fd004a2b
Contents?: true
Size: 399 Bytes
Versions: 32
Compression:
Stored size: 399 Bytes
Contents
module Urbanairship module Util module_function # @raise [ArgumentError] unless obj matches the pattern. def validate(obj, name, regex) fail ArgumentError, "#{obj} isn't a valid #{name}" unless obj =~ regex end # @return [String] the datetime formatted as expected by the API def time_format(datetime) datetime.strftime('%Y-%m-%dT%H:%M:%S') end end end
Version data entries
32 entries across 32 versions & 1 rubygems