lib/LOTR_info/Book.rb
#each chapter is saved into the instance variable specified 
each chapter is saved into the instance variable specified
each chapter is saved into the instance variable specified
def add_chapters(array_of_hashes)
        array = format_chapters(array_of_hashes)
        array.sort.each_with_index do |chapter_id_num, index|
            self.chapters["Chapter_#{index + 1}"] = {:chapter_id => chapter_id_num}
        end
    end
def add_chapters ( array_of_hashes ) array = format_chapters ( array_of_hashes ) array . sort . each_with_index do | chapter_id_num , index | self . chapters [ "Chapter_#{index + 1}" ] = { :chapter_id => chapter_id_num } end end
each chapter is saved into the instance variable specified
each chapter is saved into the instance variable specified
array_of_hashes
<not_specific>