Class: CalendariumRomanum::SanctoraleFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/calendarium-romanum/sanctorale_factory.rb

Overview

conveniently creates sanctorale from several data files

Class Method Summary collapse

Class Method Details

.create_layered(*instances) ⇒ Object

layers several sanctorale instances.



6
7
8
9
10
# File 'lib/calendarium-romanum/sanctorale_factory.rb', line 6

def create_layered(*instances)
  r = Sanctorale.new
  instances.each {|i| r.update i }
  r
end

.load_layered_from_files(*paths) ⇒ Object

loads and layers several sanctorale instances.



13
14
15
16
17
18
19
# File 'lib/calendarium-romanum/sanctorale_factory.rb', line 13

def load_layered_from_files(*paths)
  loader = SanctoraleLoader.new
  instances = paths.collect do |p|
    loader.load_from_file p
  end
  create_layered(*instances)
end