lib/dry/logic/rule.rb in dry-logic-1.0.6 vs lib/dry/logic/rule.rb in dry-logic-1.0.7

- old
+ new

@@ -1,13 +1,13 @@ # frozen_string_literal: true -require 'concurrent/map' -require 'dry/core/constants' -require 'dry/equalizer' -require 'dry/logic/operations' -require 'dry/logic/result' -require 'dry/logic/rule/interface' +require "concurrent/map" +require "dry/core/constants" +require "dry/equalizer" +require "dry/logic/operations" +require "dry/logic/result" +require "dry/logic/rule/interface" module Dry module Logic def self.Rule(*args, **options, &block) if args.any? @@ -36,16 +36,16 @@ def self.specialize(arity, curried, base = Rule) base.interfaces.fetch_or_store([arity, curried]) do interface = Interface.new(arity, curried) klass = Class.new(base) { include interface } - base.const_set("#{base.name.split('::').last}#{interface.name}", klass) + base.const_set("#{base.name.split("::").last}#{interface.name}", klass) klass end end def self.build(predicate, args: EMPTY_ARRAY, arity: predicate.arity, **options) - specialize(arity, args.size).new(predicate, { args: args, arity: arity, **options }) + specialize(arity, args.size).new(predicate, {args: args, arity: arity, **options}) end def initialize(predicate, options = EMPTY_HASH) @predicate = predicate @options = options