Class: DRP::Weights::ProcWeightFromCurrentDepth
- Inherits:
-
AbstractWeight
- Object
- AbstractWeight
- DRP::Weights::ProcWeightFromCurrentDepth
- Defined in:
- lib/weights_and_max_depths.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ ProcWeightFromCurrentDepth
constructor
A new instance of ProcWeightFromCurrentDepth.
- #value ⇒ Object
Methods inherited from AbstractWeight
Constructor Details
#initialize(args) ⇒ ProcWeightFromCurrentDepth
Returns a new instance of ProcWeightFromCurrentDepth.
253 254 255 256 |
# File 'lib/weights_and_max_depths.rb', line 253 def initialize args @rule_method = args.rule_method @proc = args.user_args.call @rule_method.max_depth end |
Instance Method Details
#value ⇒ Object
257 258 259 |
# File 'lib/weights_and_max_depths.rb', line 257 def value @proc.call @rule_method.depth end |