Class: Parker::Platform::Switch
- Defined in:
- lib/parker/platform/switch.rb
Overview
A class that models the Nintendo Switch platform.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Parker::Platform::Base
Instance Method Details
#scan_games ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/parker/platform/switch.rb', line 7 def scan_games screenshot_path = File.join(source_path, '**', '*.jpg') Dir.glob(screenshot_path).each do |path| game_id = File.basename(path, File.extname(path)).split('-')[-1] (games[game_id].screenshots ||= {}) << Screenshot.new(path) end end |