Skip to content

Commit

Permalink
Disable rubocop rule Metrics/MethodLength for Memery::ClassMethods::M…
Browse files Browse the repository at this point in the history
…emoizationModule#define_memoized_method!
  • Loading branch information
obrie committed Jan 13, 2025
1 parent 0b0b465 commit fdd8b8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/memery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def fresh?(ttl)
end
end

# rubocop:disable Metrics/MethodLength
def define_memoized_method!(klass, method_name, condition: nil, ttl: nil)
original_visibility = method_visibility(klass, method_name)

Expand Down Expand Up @@ -101,6 +102,7 @@ def define_memoized_method!(klass, method_name, condition: nil, ttl: nil)
ruby2_keywords(method_name)
send(original_visibility, method_name)
end
# rubocop:enable Metrics/MethodLength

private

Expand Down

0 comments on commit fdd8b8c

Please sign in to comment.