Class: Spectro::Config

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Singleton
Defined in:
lib/spectro/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mocks_enabledObject

Returns the value of attribute mocks_enabled



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

def mocks_enabled
  @mocks_enabled
end

Instance Method Details

#enable_mocks!Spectro::Config

Sets mocks_enabled to true

Returns:



17
18
19
20
# File 'lib/spectro/config.rb', line 17

def enable_mocks!
  self.mocks_enabled = true
  return self
end

#mocks_enabled?TrueClass, FalseClass

Returns the current mocks policy (enabled or disabled)

Returns:

  • (TrueClass, FalseClass)

    whether mocks are enabled or not



25
26
27
# File 'lib/spectro/config.rb', line 25

def mocks_enabled?
  return !!self.mocks_enabled
end