Class: ActiveCMIS::AtomicType::DateTime
- Inherits:
-
CommonBase
- Object
- CommonBase
- ActiveCMIS::AtomicType::DateTime
- Defined in:
- lib/active_cmis/atomic_types.rb
Constant Summary collapse
- YEAR =
"year"- DATE =
"date"- TIME =
"time"
Instance Attribute Summary collapse
-
#resolution ⇒ Object
readonly
Returns the value of attribute resolution.
Class Method Summary collapse
Instance Method Summary collapse
- #can_handle?(value) ⇒ Boolean
-
#initialize(resolution) ⇒ DateTime
constructor
A new instance of DateTime.
- #to_s ⇒ Object
Methods inherited from CommonBase
Constructor Details
#initialize(resolution) ⇒ DateTime
Returns a new instance of DateTime.
118 119 120 |
# File 'lib/active_cmis/atomic_types.rb', line 118 def initialize(resolution) @resolution = resolution end |
Instance Attribute Details
#resolution ⇒ Object (readonly)
Returns the value of attribute resolution.
106 107 108 |
# File 'lib/active_cmis/atomic_types.rb', line 106 def resolution @resolution end |
Class Method Details
.new(precision = TIME) ⇒ Object
109 110 111 112 |
# File 'lib/active_cmis/atomic_types.rb', line 109 def self.new(precision = TIME) raise ArgumentError.new("Got precision = #{precision.inspect}") unless [YEAR, DATE, TIME].include? precision.to_s.downcase @instances[precision] ||= super end |