Sha256: b55ebf39d83055aeae31af0afad18b2444a100e93d607a009a66b5861fe9e9d3
Contents?: true
Size: 781 Bytes
Versions: 4
Compression:
Stored size: 781 Bytes
Contents
# frozen_string_literal: true module Leftovers module Processors class Deconstantize include ComparableInstance def initialize(then_processor) @then_processor = then_processor freeze end def process(str, current_node, matched_node, acc) return unless str @then_processor.process(str.deconstantize, current_node, matched_node, acc) rescue ::NoMethodError ::Leftovers.error <<~MESSAGE Tried using the ::String#deconstantize 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 freeze end end end
Version data entries
4 entries across 4 versions & 1 rubygems