Class: CalendariumRomanum::Data::SanctoraleFile

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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.expand_path('../../data/' + base_name, File.dirname(__FILE__))
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path


11
12
13
# File 'lib/calendarium-romanum/data.rb', line 11

def path
  @path
end

#siglumObject (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

#loadObject


13
14
15
# File 'lib/calendarium-romanum/data.rb', line 13

def load
  SanctoraleLoader.new.load_from_file(@path)
end