Sha256: 53ea2e032978acfd6afa91905f4da7a57d5f27a5f9826f8c5ce872a1fb9c502c
Contents?: true
Size: 899 Bytes
Versions: 6
Compression:
Stored size: 899 Bytes
Contents
# The class whose instances represent an individual game rom # (e.g. Chrono Trigger object) class RomLoader::GameRom attr_accessor :name, :system attr_reader :rom_detail_url ,:download_url, :size, :file_ext, :filename # Create individual game rom objects from information scraped from freeroms.com, # then sets the required name and rom_detail_url instance variables def initialize(name:, rom_detail_url:) @name = name @rom_detail_url = rom_detail_url end # Creates an array of GameRom objects from an array def self.create_collection(game_array) game_array.collect {|game_details| self.new(game_details)} end # Sets all additional, optional rom details def set_rom_details(download_url: nil, size: nil, file_ext: nil, filename: nil) @download_url = download_url @size = size @file_ext = file_ext @filename = filename nil end end
Version data entries
6 entries across 6 versions & 1 rubygems