lib/romloader/game_system.rb in romloader-1.0.0 vs lib/romloader/game_system.rb in romloader-1.1.0

- old
+ new

@@ -1,7 +1,8 @@ -# The class whose instances represent an individual game system (e.g. Sega Genesis object) +# The class whose instances represent an individual game system +# (e.g. Sega Genesis object) class RomLoader::GameSystem attr_accessor :name, :rom_index_url attr_writer :rom_indices @@ -25,25 +26,28 @@ # Retrieves an array of all GameSystem objects def self.all @@all end - # Retrieves an array of all GameRom objects starting which the provided letter index (e.g. [Sonic the Hedgehog, Streets of Rage,...]) + # Retrieves an array of all GameRom objects starting which the provided letter index + # (e.g. [Sonic the Hedgehog, Streets of Rage,...]) def get_roms_by_letter(letter_index) @roms[letter_index] end - # Retrieves an array of the indicies for the roms (i.e. ["A","B","C"...]) + # Retrieves an array of the indicies for the roms + # (i.e. ["A","B","C"...]) def get_rom_indices @rom_indices.keys end - # Retrieves the url for roms of a particular letter index (e.g. "A" => "http://freeroms.com/genesis_games_that_start_with_a.html") + # Retrieves the url for roms of a particular letter index + # (e.g. "A" => "http://freeroms.com/genesis_games_that_start_with_a.html") def get_rom_collection_url(letter_index) @rom_indices[letter_index] end - # Add the game collection scraped from http://freeroms.com to the GameSystem object to the roms (Hash) + # Add the game collection scraped from http://freeroms.com to the GameSystem object to the roms Hash def add_roms_to_collection_by_letter(letter_index, game_obj_array) game_obj_array.each { |game| game.system = self } @roms[letter_index] = game_obj_array end \ No newline at end of file