From 52c0a6ec1a2e2aafb9ebc87a6677dcf2185d9591 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 12 Jun 2020 00:26:45 +0700 Subject: [PATCH] exposed some classes in the docs --- src/constraint.cr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/constraint.cr b/src/constraint.cr index fe4153d..b25586c 100644 --- a/src/constraint.cr +++ b/src/constraint.cr @@ -5,23 +5,26 @@ require "./variable_state.cr" require "./strength.cr" module Kiwi - # :nodoc: class Constraint @expression : Expression @strength : Float64 @op : RelationalOperator + # :nodoc: property expression, op getter strength + # :nodoc: def initialize(expression : Expression, op : RelationalOperator) initialize(expression, op, Strength::REQUIRED) end + # :nodoc: def initialize(other : Constraint, strength : Float64) initialize(other.expression, other.op, strength) end + # :nodoc: def initialize(expression : Expression, @op : RelationalOperator, strength : Float64) @expression = reduce(expression) @strength = Strength.clip(strength)