Class: ApiTester::Config
- Inherits:
-
Object
- Object
- ApiTester::Config
- Defined in:
- lib/api-tester/config.rb
Overview
Config class for changing how the tool operates
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
Instance Attribute Details
#modules ⇒ Object
Returns the value of attribute modules.
8 9 10 |
# File 'lib/api-tester/config.rb', line 8 def modules @modules end |
#reporter ⇒ Object
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_modules ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/api-tester/config.rb', line 33 def with_all_modules modules << Format modules << ExtraVerbs modules << GoodCase modules << Typo modules << UnusedFields self end |
#with_default_modules ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/api-tester/config.rb', line 25 def with_default_modules modules << Format modules << GoodCase modules << Typo modules << UnusedFields self end |
#with_module(new_module) ⇒ Object
20 21 22 23 |
# File 'lib/api-tester/config.rb', line 20 def with_module(new_module) modules << new_module self end |
#with_reporter(reporter) ⇒ Object
15 16 17 18 |
# File 'lib/api-tester/config.rb', line 15 def with_reporter(reporter) self.reporter = reporter self end |