Class: Seatsio::Region
- Inherits:
-
Object
- Object
- Seatsio::Region
- Defined in:
- lib/seatsio.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url) ⇒ Region
constructor
A new instance of Region.
Constructor Details
#initialize(url) ⇒ Region
Returns a new instance of Region.
35 36 37 |
# File 'lib/seatsio.rb', line 35 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
33 34 35 |
# File 'lib/seatsio.rb', line 33 def url @url end |
Class Method Details
.EU ⇒ Object
39 40 41 |
# File 'lib/seatsio.rb', line 39 def self.EU() return Region.new(Region.url_for_id("eu")) end |
.NA ⇒ Object
43 44 45 |
# File 'lib/seatsio.rb', line 43 def self.NA() return Region.new(Region.url_for_id("na")) end |
.OC ⇒ Object
51 52 53 |
# File 'lib/seatsio.rb', line 51 def self.OC() return Region.new(Region.url_for_id("oc")) end |
.SA ⇒ Object
47 48 49 |
# File 'lib/seatsio.rb', line 47 def self.SA() return Region.new(Region.url_for_id("sa")) end |
.url_for_id(id) ⇒ Object
55 56 57 |
# File 'lib/seatsio.rb', line 55 def self.url_for_id(id) return "https://api-" + id + ".seatsio.net" end |