Class: Pest::Estimator::DistributionList

Inherits:
Hash
  • Object
show all
Defined in:
lib/pest/estimator.rb

Instance Method Summary collapse

Constructor Details

#initialize(estimator) ⇒ DistributionList

Returns a new instance of DistributionList.



38
39
40
# File 'lib/pest/estimator.rb', line 38

def initialize(estimator)
  @estimator = estimator
end

Instance Method Details

#[](*args) ⇒ Object

Raises:

  • (ArgumentError)


42
43
44
45
46
47
48
49
50
# File 'lib/pest/estimator.rb', line 42

def [](*args)
  set = args.to_set
  raise ArgumentError unless (set - @estimator.variables).empty?

  unless has_key? set
    self[set] = @estimator.distribution_class.new(@estimator, set)
  end
  super(set)
end