Class: EhbrsRubyUtils::Bga::Game::Image
- Inherits:
-
Object
- Object
- EhbrsRubyUtils::Bga::Game::Image
- Defined in:
- lib/ehbrs_ruby_utils/bga/game/image.rb
Constant Summary collapse
- IMAGE_URL_PREFIX =
'https://x.boardgamearena.net/data/gamemedia/'
Instance Method Summary collapse
Instance Method Details
#fs_object_id ⇒ String
14 15 16 |
# File 'lib/ehbrs_ruby_utils/bga/game/image.rb', line 14 def fs_object_id [game.code, suffix].map(&:parameterize) end |
#local_path ⇒ Pathname
20 21 22 23 |
# File 'lib/ehbrs_ruby_utils/bga/game/image.rb', line 20 def local_path download_to_cache unless fs_cache.stored? fs_cache.content_path.to_pathname end |
#url ⇒ Addressable::URI
26 27 28 |
# File 'lib/ehbrs_ruby_utils/bga/game/image.rb', line 26 def url "#{IMAGE_URL_PREFIX}#{game.code}#{suffix}".to_uri end |