Class: RiotLolApi::Support::Region

Inherits:
Object
  • Object
show all
Defined in:
lib/riot_lol_api/supports/regions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(region) ⇒ Region

Returns a new instance of Region.



5
6
7
8
# File 'lib/riot_lol_api/supports/regions.rb', line 5

def initialize(region)
  @region = region
  @platform = find_platform
end

Instance Attribute Details

#platformObject

Returns the value of attribute platform.



4
5
6
# File 'lib/riot_lol_api/supports/regions.rb', line 4

def platform
  @platform
end

#regionObject

Returns the value of attribute region.



4
5
6
# File 'lib/riot_lol_api/supports/regions.rb', line 4

def region
  @region
end

Instance Method Details

#find_platformObject



10
11
12
# File 'lib/riot_lol_api/supports/regions.rb', line 10

def find_platform
  list[@region.to_sym]
end