Module: AruxApp::API
- Defined in:
- lib/arux_app/api.rb,
lib/arux_app/api/nav.rb,
lib/arux_app/api/auth.rb,
lib/arux_app/api/cart.rb,
lib/arux_app/api/config.rb,
lib/arux_app/api/account.rb,
lib/arux_app/api/student.rb,
lib/arux_app/api/bank_info.rb
Defined Under Namespace
Classes: Account, Auth, BankInfo, Cart, Config, Error, InitializerError, Nav, RequirementError, Student
Constant Summary
collapse
- @@mode =
:standard
Class Method Summary
collapse
Class Method Details
.server_uri ⇒ Object
19
20
21
22
23
24
25
26
27
|
# File 'lib/arux_app/api.rb', line 19
def server_uri
if AruxApp::API.standardmode?
"https://account.arux.app"
elsif AruxApp::API.testmode?
"https://account.arux.blue"
elsif AruxApp::API.devmode?
"https://account.#{HOSTNAME}"
end
end
|
.uri_escape(str) ⇒ Object
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/arux_app/api.rb', line 29
def uri_escape(str)
if URI.respond_to?(:escape)
URI.escape(str)
elsif defined? URI::DEFAULT_PARSER
URI::DEFAULT_PARSER.escape(str)
else
CGI.escape(str)
end
end
|