spec/support/factory_methods.rb in mini_kraken-0.1.10 vs spec/support/factory_methods.rb in mini_kraken-0.1.11

- old
+ new

@@ -1,9 +1,10 @@ # frozen_string_literal: true require_relative '../../lib/mini_kraken/core/any_value' require_relative '../../lib/mini_kraken/core/cons_cell' +require_relative '../../lib/mini_kraken/core/k_boolean' require_relative '../../lib/mini_kraken/core/k_symbol' require_relative '../../lib/mini_kraken/core/variable' require_relative '../../lib/mini_kraken/core/variable_ref' module MiniKraken @@ -46,9 +47,16 @@ # @param g1 [Core::Goal] # @param g2 [Core::Goal] # @return [Core::Goal] def disj2_goal(g1, g2) Core::Goal.new(Core::Disj2.instance, [g1, g2]) + end + + # Factory method for constructing a KBoolean instance + # @param aValue [Boolean] + # @return [Core::KBoolean] + def k_boolean(aValue) + Core::KBoolean.new(aValue) end # Factory method for constructing a KSymbol instance # @param aSymbol [Symbol] # @return [Core::KSymbol]