Parent

Methods

DistinctShapeConstraint

Author

Manuela Ruiz (mruiz@lcc.uma.es)

A sort of Constraint: the produced shapes must be distinct to the last produced one

Public Class Methods

new() click to toggle source

Initializing

    # File lib/constraints.rb, line 35
35:         def initialize()

36:                 @name = Constants::DISTINCT_SHAPE_CONSTRAINT_NAME

37:         end

Public Instance Methods

satisfied?() click to toggle source

Returns true iff the design complies the Constraint

    # File lib/constraints.rb, line 39
39:         def satisfied?()

40:                 equal_to_last = false

41:                 if Shade.project.execution.execution_history.size > 0

42:                         last_shape = Shade.project.execution.execution_history.last[2]

43:                         equal_to_last = (Shade.project.execution.current_shape == last_shape)

44:                 end

45:                 return !equal_to_last

46:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.