Sha256: 1a6f0f5a3a450b9317434360103eb9b319c49bc24c88e883e1ede05a3ff14058

Contents?: true

Size: 325 Bytes

Versions: 2

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

2 entries across 2 versions & 1 rubygems

Version Path
faml-0.8.1 lib/faml/filter_compilers/ruby.rb
faml-0.8.0 lib/faml/filter_compilers/ruby.rb