Class: CalendariumRomanum::Data::SanctoraleFile
- Inherits:
-
Object
- Object
- CalendariumRomanum::Data::SanctoraleFile
- Defined in:
- lib/calendarium-romanum/data.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#siglum ⇒ Object
readonly
Returns the value of attribute siglum.
Instance Method Summary collapse
-
#initialize(base_name) ⇒ SanctoraleFile
constructor
private
This class is not intended to be initialized by client code - it’s sole purpose is to provide functionality for easy loading of the bundled sanctorale data files.
-
#load ⇒ Sanctorale
Load the data file.
-
#load_with_parents ⇒ Sanctorale
Load the data file and all it’s parents.
Constructor Details
#initialize(base_name) ⇒ SanctoraleFile
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This class is not intended to be initialized by client code - it’s sole purpose is to provide functionality for easy loading of the bundled sanctorale data files.
15 16 17 18 |
# File 'lib/calendarium-romanum/data.rb', line 15 def initialize(base_name) @siglum = base_name.sub(/\.txt$/, '') @path = File.('../../data/' + base_name, File.dirname(__FILE__)) end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
20 21 22 |
# File 'lib/calendarium-romanum/data.rb', line 20 def path @path end |
#siglum ⇒ Object (readonly)
Returns the value of attribute siglum.
20 21 22 |
# File 'lib/calendarium-romanum/data.rb', line 20 def siglum @siglum end |
Instance Method Details
#load ⇒ Sanctorale
Load the data file
25 26 27 |
# File 'lib/calendarium-romanum/data.rb', line 25 def load SanctoraleLoader.new.load_from_file(path) end |
#load_with_parents ⇒ Sanctorale
Load the data file and all it’s parents
33 34 35 |
# File 'lib/calendarium-romanum/data.rb', line 33 def load_with_parents SanctoraleFactory.load_with_parents(path) end |