Class: Time
- Inherits:
-
Object
show all
- Defined in:
- lib/xommelier/core_ext/time.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.from_xommelier(value) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/xommelier/core_ext/time.rb', line 11
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
|
Instance Method Details
#to_xommelier ⇒ Object
23
24
25
|
# File 'lib/xommelier/core_ext/time.rb', line 23
def to_xommelier
xmlschema
end
|