Sha256: d1381768c6ca0f082f406faab24f11537193ed698952aef815c1d5699c6b4e37

Contents?: true

Size: 289 Bytes

Versions: 11

Compression:

Stored size: 289 Bytes

Contents

require 'time'

class Time
  def self.from_xommelier(value)
    return if value == nil
    case value
    when String
      Time.xmlschema(value)
    when Time
      value
    else
      raise Xommelier::TypeError.new(value, Time)
    end
  end

  def to_xommelier
    xmlschema
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
xommelier-0.1.30 lib/xommelier/core_ext/time.rb
xommelier-0.1.29 lib/xommelier/core_ext/time.rb
xommelier-0.1.28 lib/xommelier/core_ext/time.rb
xommelier-0.1.27 lib/xommelier/core_ext/time.rb
xommelier-0.1.26 lib/xommelier/core_ext/time.rb
xommelier-0.1.25 lib/xommelier/core_ext/time.rb
xommelier-0.1.24 lib/xommelier/core_ext/time.rb
xommelier-0.1.23 lib/xommelier/core_ext/time.rb
xommelier-0.1.22 lib/xommelier/core_ext/time.rb
xommelier-0.1.21 lib/xommelier/core_ext/time.rb
xommelier-0.1.20 lib/xommelier/core_ext/time.rb