Class: RiotLolApi::Model::Image
- Inherits:
-
Object
- Object
- RiotLolApi::Model::Image
- Includes:
- Concern::Init
- Defined in:
- lib/riot_lol_api/models/images.rb
Instance Method Summary collapse
-
#full_url ⇒ Object
build path of image.
- #sprite_url(size = 'normal') ⇒ Object
Methods included from Concern::Init
Instance Method Details
#full_url ⇒ Object
build path of image
7 8 9 |
# File 'lib/riot_lol_api/models/images.rb', line 7 def full_url "#{RiotLolApi::Client.realm['cdn']}/#{RiotLolApi::Client.realm['v']}/img/#{group}/#{full}" end |
#sprite_url(size = 'normal') ⇒ Object
11 12 13 14 |
# File 'lib/riot_lol_api/models/images.rb', line 11 def sprite_url(size = 'normal') filename = size == 'tiny' || size == 'small' ? "#{size}_#{sprite}" : sprite "#{RiotLolApi::Client.realm['cdn']}/#{RiotLolApi::Client.realm['v']}/img/sprite/#{filename}" end |