Module: Doccy::Config

Defined in:
lib/doccy/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.app_secretObject

Returns the value of attribute app_secret.



8
9
10
# File 'lib/doccy/config.rb', line 8

def app_secret
  @app_secret
end

.endpointsObject

Returns the value of attribute endpoints.



5
6
7
# File 'lib/doccy/config.rb', line 5

def endpoints
  @endpoints
end

.modeObject

Returns the value of attribute mode.



9
10
11
# File 'lib/doccy/config.rb', line 9

def mode
  @mode
end

.partner_keyObject

Returns the value of attribute partner_key.



7
8
9
# File 'lib/doccy/config.rb', line 7

def partner_key
  @partner_key
end

.prefixObject

Returns the value of attribute prefix.



6
7
8
# File 'lib/doccy/config.rb', line 6

def prefix
  @prefix
end

Class Method Details

.urlObject



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