Class: WikibaseRepresentable::Model::TimeValue
- Defined in:
- lib/wikibase_representable/model/time_value.rb
Overview
Data value object that represents a time value.
Constant Summary collapse
- TYPE =
'time'
Instance Attribute Summary
Attributes inherited from DataValue
Instance Method Summary collapse
- #==(other) ⇒ Object
- #after ⇒ Object
- #before ⇒ Object
- #calendar_model ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(value: nil) ⇒ TimeValue
constructor
A new instance of TimeValue.
- #precision ⇒ Object
- #state ⇒ Object
- #time ⇒ Object
- #time_zone ⇒ Object
Constructor Details
Instance Method Details
#==(other) ⇒ Object
43 44 45 |
# File 'lib/wikibase_representable/model/time_value.rb', line 43 def ==(other) other.class == self.class && other.state == state end |
#after ⇒ Object
27 28 29 |
# File 'lib/wikibase_representable/model/time_value.rb', line 27 def after value.after end |
#before ⇒ Object
23 24 25 |
# File 'lib/wikibase_representable/model/time_value.rb', line 23 def before value.before end |
#calendar_model ⇒ Object
35 36 37 |
# File 'lib/wikibase_representable/model/time_value.rb', line 35 def calendar_model value.calendar_model end |
#eql?(other) ⇒ Boolean
47 48 49 |
# File 'lib/wikibase_representable/model/time_value.rb', line 47 def eql?(other) self == other end |
#precision ⇒ Object
31 32 33 |
# File 'lib/wikibase_representable/model/time_value.rb', line 31 def precision value.precision end |
#state ⇒ Object
39 40 41 |
# File 'lib/wikibase_representable/model/time_value.rb', line 39 def state [type, value] end |
#time ⇒ Object
15 16 17 |
# File 'lib/wikibase_representable/model/time_value.rb', line 15 def time value.time end |
#time_zone ⇒ Object
19 20 21 |
# File 'lib/wikibase_representable/model/time_value.rb', line 19 def time_zone value.time_zone end |