Sha256: ceae45e1c0d9bf4d57a72347b0fcc34d386b56f3fca259fa488312b050fe90bb

Contents?: true

Size: 328 Bytes

Versions: 5

Compression:

Stored size: 328 Bytes

Contents

# frozen_string_literal: true
module Arbre
  module Rails
    module Rendering

      def render(*args)
        rendered = helpers.render(*args)
        case rendered
        when Arbre::Context
          current_arbre_element.add_child rendered
        else
          text_node rendered
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arbre-2.0.2 lib/arbre/rails/rendering.rb
arbre-2.0.1 lib/arbre/rails/rendering.rb
arbre-2.0.0 lib/arbre/rails/rendering.rb
arbre-1.7.0 lib/arbre/rails/rendering.rb
arbre-1.6.0 lib/arbre/rails/rendering.rb