Module: Charty::Plotters::EstimationSupport

Includes:
RandomSupport
Included in:
CategoricalPlotter
Defined in:
lib/charty/plotters/estimation_support.rb

Instance Attribute Summary collapse

Attributes included from RandomSupport

#random

Class Method Summary collapse

Methods included from RandomSupport

check_random

Instance Attribute Details

#ciObject

Returns the value of attribute ci.



28
29
30
# File 'lib/charty/plotters/estimation_support.rb', line 28

def ci
  @ci
end

#estimatorObject

Returns the value of attribute estimator.



4
5
6
# File 'lib/charty/plotters/estimation_support.rb', line 4

def estimator
  @estimator
end

#n_bootObject

Returns the value of attribute n_boot.



51
52
53
# File 'lib/charty/plotters/estimation_support.rb', line 51

def n_boot
  @n_boot
end

#unitsObject

Returns the value of attribute units.



71
72
73
# File 'lib/charty/plotters/estimation_support.rb', line 71

def units
  @units
end

Class Method Details

.check_estimator(value) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/charty/plotters/estimation_support.rb', line 10

module_function def check_estimator(value)
  case value
  when :count, "count"
    :count
  when :mean, "mean"
    :mean
  when :median
    raise NotImplementedError,
          "median estimator has not been supported yet"
  when Proc
    raise NotImplementedError,
          "a callable estimator has not been supported yet"
  else
    raise ArgumentError,
          "invalid value for estimator (%p for :mean)" % value
  end
end