Sha256: cddc14a6c6bdbaab8e35e4ba95bfebf13072fba66829e8c76ff12e1730186c65

Contents?: true

Size: 325 Bytes

Versions: 9

Compression:

Stored size: 325 Bytes

Contents

# frozen-string-literal: true
require_relative 'base'

module Faml
  module FilterCompilers
    class Ruby < Base
      def need_newline?
        false
      end

      def compile(ast)
        [:multi, [:newline], [:code, strip_last_empty_lines(ast.texts).join("\n")]]
      end
    end

    register(:ruby, Ruby)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
faml-0.7.3 lib/faml/filter_compilers/ruby.rb
faml-0.7.2 lib/faml/filter_compilers/ruby.rb
faml-0.7.1 lib/faml/filter_compilers/ruby.rb
faml-0.7.0 lib/faml/filter_compilers/ruby.rb
faml-0.6.5 lib/faml/filter_compilers/ruby.rb
faml-0.6.4 lib/faml/filter_compilers/ruby.rb
faml-0.6.3 lib/faml/filter_compilers/ruby.rb
faml-0.6.2 lib/faml/filter_compilers/ruby.rb
faml-0.6.1 lib/faml/filter_compilers/ruby.rb