Class: Modesty::Experiment::ArgumentProxy
- Inherits:
-
Object
- Object
- Modesty::Experiment::ArgumentProxy
show all
- Defined in:
- lib/modesty/experiment/stats.rb
Instance Method Summary
collapse
Constructor Details
49
50
51
52
|
# File 'lib/modesty/experiment/stats.rb', line 49
def initialize(obj, *args)
@obj = obj
@args = args
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
58
59
60
61
62
63
64
65
66
|
# File 'lib/modesty/experiment/stats.rb', line 58
def method_missing(meth, *args)
data = @obj.send(meth, *(args + @args))
data = data.sum if data.is_a?(Array)
data
end
|
Instance Method Details
#inspect ⇒ Object
54
55
56
|
# File 'lib/modesty/experiment/stats.rb', line 54
def inspect
"#<ArgumentProxy[ #{@obj.inspect} ]>"
end
|