Class: Parker::Platform::Steam

Inherits:
Base
  • Object
show all
Defined in:
lib/parker/platform/steam.rb

Overview

A class that models the Steam platform.

Instance Attribute Summary

Attributes inherited from Base

#games, #name, #source_path

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Parker::Platform::Base

Instance Method Details

#scan_gamesObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/parker/platform/steam.rb', line 7

def scan_games
  games.each do |identifier, game|
    screenshot_path = File.join(
      source_path,
      identifier.to_s,
      'screenshots',
      '*.jpg'
    )

    Dir.glob(screenshot_path).each do |path|
      game.screenshots << Screenshot.new(path)
    end
  end
end