class Spectro::Config
Constants
- API_HOSTNAME
Attributes
mocks_enabled[RW]
Public Instance Methods
api_hostname()
click to toggle source
Returns the API Hostname from the config or the default if missin
@return [String] the API Hostname
# File lib/spectro/config.rb, line 20 def api_hostname return @api_hostname || API_HOSTNAME end
api_hostname=(hostname)
click to toggle source
Sets a custom API Hostname
@param [String|NilClass] hostname the custom hostname or `nil` for the default @return [String|NilClass]
# File lib/spectro/config.rb, line 28 def api_hostname= hostname @api_hostname = hostname end
enable_mocks!()
click to toggle source
Sets mocks_enabled
to true
@return [Spectro::Config] self
# File lib/spectro/config.rb, line 35 def enable_mocks! self.mocks_enabled = true return self end
mocks_enabled?()
click to toggle source
Returns the current mocks policy (enabled or disabled)
@return [TrueClass, FalseClass] whether mocks are enabled or not
# File lib/spectro/config.rb, line 43 def mocks_enabled? return !!self.mocks_enabled end