Sha256: 939497822f144cda4be04b98fcf76184b541dd8ceb42b29b32ad765e03a031f8

Contents?: true

Size: 361 Bytes

Versions: 14

Compression:

Stored size: 361 Bytes

Contents

module Rbexy
  module Nodes
    class Root < AbstractNode
      attr_accessor :children

      def initialize(children)
        @children = children
      end

      def precompile
        Root.new(compact(children.map(&:precompile).flatten))
      end

      def compile
        "#{children.map(&:compile).join}@output_buffer.to_s"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rbexy-2.0.0.rc5 lib/rbexy/nodes/root.rb
rbexy-2.0.0.rc4 lib/rbexy/nodes/root.rb
rbexy-2.0.0.rc3 lib/rbexy/nodes/root.rb
rbexy-2.0.0.rc2 lib/rbexy/nodes/root.rb
rbexy-2.0.0.rc1 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta9 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta8 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta7 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta6 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta5 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta4 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta3 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta2 lib/rbexy/nodes/root.rb
rbexy-2.0.0.beta1 lib/rbexy/nodes/root.rb