Sha256: 05d323f7a98b3a75543447152e11bb81069cdcd2784fcdc6f37e0d4009a6f40a
Contents?: true
Size: 695 Bytes
Versions: 6
Compression:
Stored size: 695 Bytes
Contents
# frozen_string_literal: true module Leftovers module ValueProcessors class Underscore def initialize(then_processor) @then_processor = then_processor freeze end def process(str, node, method_node) return unless str @then_processor.process(str.underscore, node, method_node) rescue NoMethodError Leftovers.error <<~MESSAGE Tried using the String#underscore 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