Class: Mo2tex::ExcludeDate

Inherits:
ExcludeBase show all
Defined in:
lib/mo2tex/exclude_date.rb

Instance Attribute Summary collapse

Attributes inherited from ExcludeBase

#end_period, #start_period

Instance Method Summary collapse

Methods inherited from ExcludeBase

#skip?

Constructor Details

#initialize(d, sd, ed) ⇒ ExcludeDate

Returns a new instance of ExcludeDate.

Raises:



38
39
40
41
42
# File 'lib/mo2tex/exclude_date.rb', line 38

def initialize(d, sd, ed)
  super(sd, ed)
  @date = DateTime.parse(d.to_s)
  raise DateOutOfRange, self.date.to_s unless within_period?(self.date)
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



36
37
38
# File 'lib/mo2tex/exclude_date.rb', line 36

def date
  @date
end

Instance Method Details

#does_it_skip?(d) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/mo2tex/exclude_date.rb', line 44

def does_it_skip?(d)
  return d == self.date
end