Module: Periods::Modules::NullPeriod::InstanceMethods

Defined in:
lib/periods/modules/null_period.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end_dateObject (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_dateObject (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

#daysObject



36
37
38
# File 'lib/periods/modules/null_period.rb', line 36

def days
  0
end

#end_yearObject



44
45
46
# File 'lib/periods/modules/null_period.rb', line 44

def end_year
  0
end

#include?(period) ⇒ Boolean

Returns:

  • (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

#nextObject



28
29
30
# File 'lib/periods/modules/null_period.rb', line 28

def next
  self
end

#previousObject



32
33
34
# File 'lib/periods/modules/null_period.rb', line 32

def previous
  self
end

#start_yearObject



40
41
42
# File 'lib/periods/modules/null_period.rb', line 40

def start_year
  0
end

#to_sObject



52
53
54
# File 'lib/periods/modules/null_period.rb', line 52

def to_s
  "#{self.class.name}"
end