Class: EDTF::Epoch
- Inherits:
-
Object
- Object
- EDTF::Epoch
- Extended by:
- Forwardable
- Includes:
- Comparable, Enumerable
- Defined in:
- lib/edtf/epoch.rb
Instance Attribute Summary collapse
-
#year ⇒ Object
(also: #get)
Returns the value of attribute year.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(year = 0) ⇒ Epoch
constructor
A new instance of Epoch.
- #to_date ⇒ Object
Constructor Details
#initialize(year = 0) ⇒ Epoch
Returns a new instance of Epoch.
16 17 |
# File 'lib/edtf/epoch.rb', line 16 def initialize(year = 0) end |
Instance Attribute Details
#year ⇒ Object Also known as: get
Returns the value of attribute year.
9 10 11 |
# File 'lib/edtf/epoch.rb', line 9 def year @year end |
Instance Method Details
#<=>(other) ⇒ Object
19 20 |
# File 'lib/edtf/epoch.rb', line 19 def <=>(other) end |
#to_date ⇒ Object
23 24 25 |
# File 'lib/edtf/epoch.rb', line 23 def to_date Date.new(year) end |