Class: ApiTester::Config
- Inherits:
-
Object
- Object
- ApiTester::Config
- Defined in:
- lib/api-tester/config.rb
Instance Attribute Summary collapse
-
#modules ⇒ Object
Returns the value of attribute modules.
-
#reporter ⇒ Object
Returns the value of attribute reporter.
Instance Method Summary collapse
-
#initialize(reporter = ApiTester::ApiReport.new) ⇒ Config
constructor
A new instance of Config.
- #with_all_modules ⇒ Object
- #with_default_modules ⇒ Object
- #with_module(new_module) ⇒ Object
- #with_reporter(reporter) ⇒ Object
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
#modules ⇒ Object
Returns the value of attribute modules.
6 7 8 |
# File 'lib/api-tester/config.rb', line 6 def modules @modules end |
#reporter ⇒ Object
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_modules ⇒ Object
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_modules ⇒ Object
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 |