Class: Wikidata::DataValues::Time
- Inherits:
-
Value
- Object
- HashedObject
- Value
- Wikidata::DataValues::Time
- Defined in:
- lib/wikidata/datavalues/time.rb
Instance Attribute Summary
Attributes inherited from HashedObject
Instance Method Summary collapse
Methods inherited from Value
Methods inherited from HashedObject
Constructor Details
This class inherits a constructor from Wikidata::HashedObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Wikidata::HashedObject
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/wikidata/datavalues/time.rb', line 9 def to_s to_time.iso8601 end |
#to_time ⇒ Object
5 6 7 |
# File 'lib/wikidata/datavalues/time.rb', line 5 def to_time DateTime.parse(data_hash.time) end |