Gecoder C0 Coverage Information - RCov

lib/gecoder/interface/constraints/fixnum_enum_constraints.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/gecoder/interface/constraints/fixnum_enum_constraints.rb 42 18
100.00%
100.00%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 # A module containing constraints that have enumerations of instances of
2 # Fixnum as left hand side.
3 module Gecode::FixnumEnum #:nodoc:
4   # A FixnumEnumOperand is a enumeration of Fixnum on which the
5   # constraints defined in FixnumEnumConstraintReceiver can be placed.
6   # They typically service as constant arrays or constant sets.
7   #
8   # The fixnum enumeration operands are created by wrapping an enumeration 
9   # of fixnum Gecode::Mixin#wrap_enum. The enumerations created that way
10   # all respond to the properties defined by FixnumEnumOperand.
11   #
12   # ==== Examples 
13   #
14   # Uses Gecode::Mixin#wrap_enum inside a problem formulation to create
15   # a FixnumEnumOperand from an existing enumeration of Fixnum:
16   #
17   #   fixnum_enum = wrap_enum([3, 5, 7])
18   #   
19   #--
20   # Classes that mix in FixnumEnumOperand must define #model.
21   module FixnumEnumOperand
22     include Gecode::Operand 
23 
24     def method_missing(method, *args) #:nodoc:
25       if Gecode::FixnumEnum::Dummy.instance_methods.include? method.to_s
26         # Delegate to the fixnum enum.
27         to_fixnum_enum.method(method).call(*args)
28       else
29         super
30       end
31     end
32 
33     private
34   
35     def construct_receiver(params)
36       raise NotImplementedError, 'Fixnum enums do not have constraints.'
37     end
38   end
39 end
40 
41 require 'gecoder/interface/constraints/fixnum_enum/element'
42 require 'gecoder/interface/constraints/fixnum_enum/operation'

Generated on Thu Jan 08 13:27:03 +0100 2015 with rcov 1.0.0