Module: Doccy::Config
- Defined in:
- lib/doccy/config.rb
Class Attribute Summary collapse
-
.app_secret ⇒ Object
Returns the value of attribute app_secret.
-
.endpoints ⇒ Object
Returns the value of attribute endpoints.
-
.mode ⇒ Object
Returns the value of attribute mode.
-
.partner_key ⇒ Object
Returns the value of attribute partner_key.
-
.prefix ⇒ Object
Returns the value of attribute prefix.
Class Method Summary collapse
Class Attribute Details
.app_secret ⇒ Object
Returns the value of attribute app_secret.
8 9 10 |
# File 'lib/doccy/config.rb', line 8 def app_secret @app_secret end |
.endpoints ⇒ Object
Returns the value of attribute endpoints.
5 6 7 |
# File 'lib/doccy/config.rb', line 5 def endpoints @endpoints end |
.mode ⇒ Object
Returns the value of attribute mode.
9 10 11 |
# File 'lib/doccy/config.rb', line 9 def mode @mode end |
.partner_key ⇒ Object
Returns the value of attribute partner_key.
7 8 9 |
# File 'lib/doccy/config.rb', line 7 def partner_key @partner_key end |
.prefix ⇒ Object
Returns the value of attribute prefix.
6 7 8 |
# File 'lib/doccy/config.rb', line 6 def prefix @prefix end |
Class Method Details
.url ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/doccy/config.rb', line 23 def self.url if self.mode == :production [self.endpoints[:production], "/api", self.prefix, ].join elsif self.mode == :development [self.endpoints[:development], "/api", self.prefix, ].join else [self.endpoints[:staging], "/api", self.prefix, ].join end end |