Sha256: 291a11896b5bff94d0efa03a28552a5227274adc4c0d572c172981f894bdaf6f

Contents?: true

Size: 478 Bytes

Versions: 2

Compression:

Stored size: 478 Bytes

Contents

module Rich
  module I18n
    module Core
      module ERB
        module Output
        
          def self.included(base)
            base.class_eval do
              alias_method_chain :push, :rich_i18n
            end
          end
      
          def push_with_rich_i18n(cmd)
            push_without_rich_i18n cmd.match(/^#{@compiler.insert_cmd}\(\(.*\)\.to_s\)$/) ? cmd.gsub(/to_s\)$/, "to_output)") : cmd
          end
        
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rich_i18n-1.2.0 lib/rich/i18n/core/erb/output.rb
rich_i18n-1.0.3 lib/rich/i18n/core/erb/output.rb