Module: Periods::Modules::NullPeriod::InstanceMethods
- Defined in:
- lib/periods/modules/null_period.rb
Instance Attribute Summary collapse
-
#end_date ⇒ Object
readonly
Returns the value of attribute end_date.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
Instance Method Summary collapse
- #<=>(period) ⇒ Object
- #==(period) ⇒ Object
- #days ⇒ Object
- #end_year ⇒ Object
- #include?(period) ⇒ Boolean
- #initialize(*args) ⇒ Object
- #next ⇒ Object
- #previous ⇒ Object
- #start_year ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#end_date ⇒ Object (readonly)
Returns the value of attribute end_date.
15 16 17 |
# File 'lib/periods/modules/null_period.rb', line 15 def end_date @end_date end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
14 15 16 |
# File 'lib/periods/modules/null_period.rb', line 14 def start_date @start_date end |
Instance Method Details
#<=>(period) ⇒ Object
24 25 26 |
# File 'lib/periods/modules/null_period.rb', line 24 def <=>(period) 0 end |
#==(period) ⇒ Object
20 21 22 |
# File 'lib/periods/modules/null_period.rb', line 20 def ==(period) self.class == period.class end |
#days ⇒ Object
36 37 38 |
# File 'lib/periods/modules/null_period.rb', line 36 def days 0 end |
#end_year ⇒ Object
44 45 46 |
# File 'lib/periods/modules/null_period.rb', line 44 def end_year 0 end |
#include?(period) ⇒ Boolean
48 49 50 |
# File 'lib/periods/modules/null_period.rb', line 48 def include?(period) false end |
#initialize(*args) ⇒ Object
17 18 |
# File 'lib/periods/modules/null_period.rb', line 17 def initialize(*args) end |
#next ⇒ Object
28 29 30 |
# File 'lib/periods/modules/null_period.rb', line 28 def next self end |
#previous ⇒ Object
32 33 34 |
# File 'lib/periods/modules/null_period.rb', line 32 def previous self end |
#start_year ⇒ Object
40 41 42 |
# File 'lib/periods/modules/null_period.rb', line 40 def start_year 0 end |
#to_s ⇒ Object
52 53 54 |
# File 'lib/periods/modules/null_period.rb', line 52 def to_s "#{self.class.name}" end |