Class: Seatsio::Region

Inherits:
Object
  • Object
show all
Defined in:
lib/seatsio.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#urlObject (readonly)

Returns the value of attribute url.



33
34
35
# File 'lib/seatsio.rb', line 33

def url
  @url
end

Class Method Details

.EUObject



39
40
41
# File 'lib/seatsio.rb', line 39

def self.EU()
  return Region.new(Region.url_for_id("eu"))
end

.NAObject



43
44
45
# File 'lib/seatsio.rb', line 43

def self.NA()
  return Region.new(Region.url_for_id("na"))
end

.OCObject



51
52
53
# File 'lib/seatsio.rb', line 51

def self.OC()
  return Region.new(Region.url_for_id("oc"))
end

.SAObject



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