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.
14 15 16 17 |
# File 'lib/calendarium-romanum/data.rb', line 14 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.
19 20 21 |
# File 'lib/calendarium-romanum/data.rb', line 19 def path @path end |
#siglum ⇒ Object (readonly)
Returns the value of attribute siglum.
19 20 21 |
# File 'lib/calendarium-romanum/data.rb', line 19 def siglum @siglum end |
Instance Method Details
#load ⇒ Sanctorale
Load the data file
24 25 26 |
# File 'lib/calendarium-romanum/data.rb', line 24 def load SanctoraleLoader.new.load_from_file(path) end |
#load_with_parents ⇒ Sanctorale
Load the data file and all it’s parents
32 33 34 |
# File 'lib/calendarium-romanum/data.rb', line 32 def load_with_parents SanctoraleFactory.load_with_parents(path) end |