Class: BCDD::Contract::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/bcdd/contract/config.rb

Overview

A singleton class to store the configuration of the gem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



11
12
13
14
15
# File 'lib/bcdd/contract/config.rb', line 11

def initialize
  self.proxy_enabled = true
  self.interface_enabled = true
  self.assertions_enabled = true
end

Instance Attribute Details

#assertions_enabledObject

Returns the value of attribute assertions_enabled.



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

def assertions_enabled
  @assertions_enabled
end

#interface_enabledObject

Returns the value of attribute interface_enabled.



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

def interface_enabled
  @interface_enabled
end

#proxy_enabledObject

Returns the value of attribute proxy_enabled.



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

def proxy_enabled
  @proxy_enabled
end

Instance Method Details

#optionsObject



17
18
19
20
21
22
23
# File 'lib/bcdd/contract/config.rb', line 17

def options
  {
    proxy_enabled: proxy_enabled,
    interface_enabled: interface_enabled,
    assertions_enabled: assertions_enabled
  }
end