class AppTester::Options

@abstract Framework options @attr_accessor default_environment [Symbol] the default environment in case command line script is executed without a server defined @attr_accessor environments [Hash] the list of environments @attr_accessor log_connection [TrueClass, FalseClass] if we should or not log Faraday connections @todo implement connection retries

Attributes

default_environment[RW]
default_options[RW]
environments[RW]
log_connections[RW]

Public Class Methods

new() click to toggle source
# File lib/app-tester/options.rb, line 14
def initialize
  @environments = {}
  @default_environment = nil
  @log_connections = false
  @default_options = []
end

Public Instance Methods

add_default_option(symbol, *opts, &block) click to toggle source
# 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) click to toggle source

Add a new environment to the environment list. This will be used when constructing AppTester::Parser object

@param environment [Hash] Symbol to String mapping

@return [AppTester::Options] returns self

# File lib/app-tester/options.rb, line 26
def add_environment environment
  @environments.merge! environment
  self
end