Sha256: ed1054cf78f3d9c8f8022dc745f3a5ef9477192ca2eb97d562d8d5b652e0911e

Contents?: true

Size: 546 Bytes

Versions: 12

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true

require 'erubis'

module Erubis
  class OnlyRuby < Eruby
    def add_preamble(src); end

    def add_text(src, text)
      src << text.gsub(/[^\s;]/, '')
    end

    def add_stmt(src, code)
      src << code
      src << ';'
    end

    def add_expr_literal(src, code)
      src << code
      src << ';'
    end

    def add_expr_escaped(src, code)
      src << code
      src << ';'
    end

    def add_expr_debug(src, code)
      src << code
      src << ';'
    end

    def add_postamble(src); end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails_best_practices-1.23.2 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.23.1 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.23.0 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.22.1 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.22.0 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.21.0 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.20.1 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.20.0 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.19.5 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.19.4 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.19.3 lib/rails_best_practices/core_ext/erubis.rb
rails_best_practices-1.19.2 lib/rails_best_practices/core_ext/erubis.rb