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.
9 10 11 |
# File 'lib/api-tester/config.rb', line 9 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
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_modules ⇒ Object
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 |