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
12 13 14 |
# File 'lib/ehbrs_ruby_utils/bga/game/image.rb', line 12 def fs_object_id [game.code, suffix].map(&:parameterize) end |
#local_path ⇒ Pathname
18 19 20 21 |
# File 'lib/ehbrs_ruby_utils/bga/game/image.rb', line 18 def local_path download_to_cache unless fs_cache.stored? fs_cache.content_path.to_pathname end |
#url ⇒ Addressable::URI
24 25 26 |
# File 'lib/ehbrs_ruby_utils/bga/game/image.rb', line 24 def url "#{IMAGE_URL_PREFIX}#{game.code}#{suffix}".to_uri end |