class BigBench::Configuration::Config

The main config object for BigBench. It allows config options to be added and forces some default values before it is valid?

Constants

VALIDATE_OPTIONS

Attributes

basic_auth[RW]
bot_checks_every[RW]
duration[RW]
mode[RW]
output[RW]
users[RW]

Public Class Methods

add_option(name) click to toggle source
# File lib/bigbench/configuration.rb, line 46
def self.add_option(name)
  attr_accessor name unless self.respond_to?(name)
end
new() click to toggle source
# File lib/bigbench/configuration.rb, line 42
def initialize
  @users, @duration, @mode, @bot_checks_every = 1, 1.second, :local, 1.minute
end

Public Instance Methods

valid?() click to toggle source
# File lib/bigbench/configuration.rb, line 50
def valid?
  VALIDATE_OPTIONS.each{ |option| return false if send(option).nil? }
  true
end