Class: RiotLolApi::Support::Region
- Inherits:
-
Object
- Object
- RiotLolApi::Support::Region
- Defined in:
- lib/riot_lol_api/supports/regions.rb
Instance Attribute Summary collapse
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
- #find_platform ⇒ Object
-
#initialize(region) ⇒ Region
constructor
A new instance of Region.
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
#platform ⇒ Object
Returns the value of attribute platform.
4 5 6 |
# File 'lib/riot_lol_api/supports/regions.rb', line 4 def platform @platform end |
#region ⇒ Object
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_platform ⇒ Object
10 11 12 |
# File 'lib/riot_lol_api/supports/regions.rb', line 10 def find_platform list[@region.to_sym] end |