• Peter Leitzen's avatar
    Cop/StaticTranslationDefinition: Allow constant assignments for Structs · 8c56c779
    Peter Leitzen authored
    Prior this commit, Cop/StaticTranslationDefinition would flag the
    following code:
    
        SomeClass = Struct.new do
          def text
            _('Some translated text')
          end
        end
    
    This commit allow such style again so workarounds are not longer needed
    like:
    
        Struct.new('SomeClass') do
          def text
            _('Some translated text')
          end
        end
    8c56c779
static_translation_definition.rb 1.73 KB