Class: Pest::Estimator::DistributionList
- Inherits:
-
Hash
- Object
- Hash
- Pest::Estimator::DistributionList
- Defined in:
- lib/pest/estimator.rb
Instance Method Summary collapse
- #[](*args) ⇒ Object
-
#initialize(estimator) ⇒ DistributionList
constructor
A new instance of DistributionList.
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
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 |