From 2b2cfb4e37608e3871f77a4284fff8b9c4bcd0b7 Mon Sep 17 00:00:00 2001 From: Joshua Lane Date: Tue, 16 Apr 2024 15:19:33 -0700 Subject: [PATCH] refactor: remove now unused operation files This classes are not included and were replace by simple lambdas in `lib/toggles/feature.rb` --- lib/toggles/feature/operation/and.rb | 0 lib/toggles/feature/operation/gt.rb | 9 --------- lib/toggles/feature/operation/in.rb | 15 --------------- lib/toggles/feature/operation/range.rb | 8 -------- 4 files changed, 32 deletions(-) delete mode 100644 lib/toggles/feature/operation/and.rb delete mode 100644 lib/toggles/feature/operation/gt.rb delete mode 100644 lib/toggles/feature/operation/in.rb delete mode 100644 lib/toggles/feature/operation/range.rb diff --git a/lib/toggles/feature/operation/and.rb b/lib/toggles/feature/operation/and.rb deleted file mode 100644 index e69de29..0000000 diff --git a/lib/toggles/feature/operation/gt.rb b/lib/toggles/feature/operation/gt.rb deleted file mode 100644 index e182e32..0000000 --- a/lib/toggles/feature/operation/gt.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Feature - module Operation - class GreaterThan - def self.call(entity, attr_name, expected) - entity.send(attr_name) > expected - end - end - end -end diff --git a/lib/toggles/feature/operation/in.rb b/lib/toggles/feature/operation/in.rb deleted file mode 100644 index 16bb95d..0000000 --- a/lib/toggles/feature/operation/in.rb +++ /dev/null @@ -1,15 +0,0 @@ -module Feature - module Operation - class In - def self.call(entity, attr_name, expected) - if expected.kind_of? Hash - expected = expected.reduce([]) do |list, (operation, args)| - Feature.operations[operation.to_sym].call(args) - end - end - - expected.include? entity.send(attr_name.to_sym) - end - end - end -end diff --git a/lib/toggles/feature/operation/range.rb b/lib/toggles/feature/operation/range.rb deleted file mode 100644 index 851b89f..0000000 --- a/lib/toggles/feature/operation/range.rb +++ /dev/null @@ -1,8 +0,0 @@ -module Feature - module Operation - class Range - def self.call(args) - end - end - end -end