Class: Calrom::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/calrom/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



3
4
5
6
# File 'lib/calrom/config.rb', line 3

def initialize
  self.today = Date.today
  self.date_range = Month.new(today.year, today.month)
end

Instance Attribute Details

#coloursObject

Returns the value of attribute colours.



8
9
10
# File 'lib/calrom/config.rb', line 8

def colours
  @colours
end

#date_rangeObject

Returns the value of attribute date_range.



8
9
10
# File 'lib/calrom/config.rb', line 8

def date_range
  @date_range
end

#formatterObject

Returns the value of attribute formatter.



8
9
10
# File 'lib/calrom/config.rb', line 8

def formatter
  @formatter
end

#todayObject

Returns the value of attribute today.



8
9
10
# File 'lib/calrom/config.rb', line 8

def today
  @today
end

Instance Method Details

#calendarObject



10
11
12
# File 'lib/calrom/config.rb', line 10

def calendar
  CR::PerpetualCalendar.new(sanctorale: CR::Data::GENERAL_ROMAN_ENGLISH.load)
end

#highlighter(colourful) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/calrom/config.rb', line 24

def highlighter(colourful)
  if self.colours == false
    return Highlighter::No.new
  end

  colourful.new
end