Class: ApiTester::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Config.



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

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

Instance Attribute Details

#modulesObject

Returns the value of attribute modules.



6
7
8
# File 'lib/api-tester/config.rb', line 6

def modules
  @modules
end

#reporterObject

Returns the value of attribute reporter.



5
6
7
# File 'lib/api-tester/config.rb', line 5

def reporter
  @reporter
end

Instance Method Details

#with_all_modulesObject



31
32
33
34
35
36
37
38
# File 'lib/api-tester/config.rb', line 31

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

#with_default_modulesObject



23
24
25
26
27
28
29
# File 'lib/api-tester/config.rb', line 23

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

#with_module(new_module) ⇒ Object



18
19
20
21
# File 'lib/api-tester/config.rb', line 18

def with_module new_module
  self.modules << new_module
  self
end

#with_reporter(reporter) ⇒ Object



13
14
15
16
# File 'lib/api-tester/config.rb', line 13

def with_reporter reporter
  self.reporter = reporter
  self
end