Class: ApiTester::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/api-tester/config.rb

Overview

Config class for changing how the tool operates

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reporter: ApiTester::ApiReport.new) ⇒ Config

Returns a new instance of Config.



11
12
13
14
# File 'lib/api-tester/config.rb', line 11

def initialize(reporter: ApiTester::ApiReport.new)
  self.reporter = reporter
  self.modules = []
end

Instance Attribute Details

#modulesObject

Returns the value of attribute modules.



9
10
11
# File 'lib/api-tester/config.rb', line 9

def modules
  @modules
end

#reporterObject

Returns the value of attribute reporter.



8
9
10
# File 'lib/api-tester/config.rb', line 8

def reporter
  @reporter
end

Instance Method Details

#with_all_modulesObject



34
35
36
37
38
39
40
41
# File 'lib/api-tester/config.rb', line 34

def with_all_modules
  modules << Format
  modules << ExtraVerbs
  modules << GoodCase
  modules << Typo
  modules << UnusedFields
  self
end

#with_default_modulesObject



26
27
28
29
30
31
32
# File 'lib/api-tester/config.rb', line 26

def with_default_modules
  modules << Format
  modules << GoodCase
  modules << Typo
  modules << UnusedFields
  self
end

#with_module(new_module) ⇒ Object



21
22
23
24
# File 'lib/api-tester/config.rb', line 21

def with_module(new_module)
  modules << new_module
  self
end

#with_reporter(reporter) ⇒ Object



16
17
18
19
# File 'lib/api-tester/config.rb', line 16

def with_reporter(reporter)
  self.reporter = reporter
  self
end