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
A new instance of SanctoraleFile.
- #load ⇒ Object
Constructor Details
#initialize(base_name) ⇒ SanctoraleFile
Returns a new instance of SanctoraleFile.
6 7 8 9 |
# File 'lib/calendarium-romanum/data.rb', line 6 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
11 12 13 |
# File 'lib/calendarium-romanum/data.rb', line 11 def path @path end |
#siglum ⇒ Object (readonly)
Returns the value of attribute siglum
11 12 13 |
# File 'lib/calendarium-romanum/data.rb', line 11 def siglum @siglum end |
Instance Method Details
#load ⇒ Object
13 14 15 |
# File 'lib/calendarium-romanum/data.rb', line 13 def load SanctoraleLoader.new.load_from_file(@path) end |