Class: AppTester::Options Abstract
- Inherits:
-
Object
- Object
- AppTester::Options
- Defined in:
- lib/app-tester/options.rb
Overview
This class is abstract.
Framework options
TODO:
implement connection retries
Instance Attribute Summary collapse
-
#default_environment ⇒ Object
Returns the value of attribute default_environment.
-
#default_options ⇒ Object
Returns the value of attribute default_options.
-
#environments ⇒ Object
Returns the value of attribute environments.
-
#log_connections ⇒ Object
Returns the value of attribute log_connections.
Instance Method Summary collapse
- #add_default_option(symbol, *opts, &block) ⇒ Object
-
#add_environment(environment) ⇒ AppTester::Options
Add a new environment to the environment list.
-
#initialize ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
14 15 16 17 18 19 |
# File 'lib/app-tester/options.rb', line 14 def initialize @environments = {} @default_environment = nil @log_connections = false @default_options = [] end |
Instance Attribute Details
#default_environment ⇒ Object
Returns the value of attribute default_environment.
9 10 11 |
# File 'lib/app-tester/options.rb', line 9 def default_environment @default_environment end |
#default_options ⇒ Object
Returns the value of attribute default_options.
12 13 14 |
# File 'lib/app-tester/options.rb', line 12 def @default_options end |
#environments ⇒ Object
Returns the value of attribute environments.
11 12 13 |
# File 'lib/app-tester/options.rb', line 11 def environments @environments end |
#log_connections ⇒ Object
Returns the value of attribute log_connections.
10 11 12 |
# File 'lib/app-tester/options.rb', line 10 def log_connections @log_connections end |
Instance Method Details
#add_default_option(symbol, *opts, &block) ⇒ Object
31 32 33 |
# File 'lib/app-tester/options.rb', line 31 def add_default_option(symbol, *opts, &block) @default_options << {symbol: symbol, opts: opts, block: block } end |
#add_environment(environment) ⇒ AppTester::Options
Add a new environment to the environment list. This will be used when constructing AppTester::Parser object
26 27 28 29 |
# File 'lib/app-tester/options.rb', line 26 def add_environment environment @environments.merge! environment self end |