Sha256: 75452bf9d4df2b2c4f6f72dd51009ea7a8aca647cf3484a260d36b4b22d1a946
Contents?: true
Size: 698 Bytes
Versions: 6
Compression:
Stored size: 698 Bytes
Contents
# frozen_string_literal: true module Leftovers module ValueProcessors class Singularize def initialize(then_processor) @then_processor = then_processor freeze end def process(str, node, method_node) return unless str @then_processor.process(str.singularize, node, method_node) rescue NoMethodError Leftovers.error <<~MESSAGE Tried using the String#singularize method, but the activesupport gem was not available and/or not required `gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml MESSAGE end end end end
Version data entries
6 entries across 6 versions & 1 rubygems