Class: CampusIvy::Configuration
- Inherits:
-
Object
- Object
- CampusIvy::Configuration
- Defined in:
- lib/campus_ivy/configuration.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 |
# File 'lib/campus_ivy/configuration.rb', line 8 def initialize @token = nil @sandbox = ENV['CAMPUS_IVY_USE_SANDBOX'] == 'true' @base_url = @sandbox ? 'https://apisandbox.campusivy.com/Apis/CampusIvy.API/api' : 'https://api.campusivy.com/v1' end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
5 6 7 |
# File 'lib/campus_ivy/configuration.rb', line 5 def base_url @base_url end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
6 7 8 |
# File 'lib/campus_ivy/configuration.rb', line 6 def sandbox @sandbox end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/campus_ivy/configuration.rb', line 5 def token @token end |