Sha256: adf4d2f9f849e22b6bc7db74f9f7eac0b936de166624586b30b3a612e8c3b798

Contents?: true

Size: 327 Bytes

Versions: 8

Compression:

Stored size: 327 Bytes

Contents

require_relative '../base_node_renderer'

module RichTextRenderer
  # Base renderer for inline nodes.
  class BaseInlineRenderer < BaseNodeRenderer
    # Renders inline nodes.
    def render(node)
      "<#{render_tag}>#{node['value']}</#{render_tag}>"
    end

    protected

    def render_tag
      'span'
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rich_text_renderer-0.3.2 lib/rich_text_renderer/text_renderers/base_inline_renderer.rb
rich_text_renderer-0.3.1 lib/rich_text_renderer/text_renderers/base_inline_renderer.rb
rich_text_renderer-0.3.0 lib/rich_text_renderer/text_renderers/base_inline_renderer.rb
rich_text_renderer-0.2.3 lib/rich_text_renderer/text_renderers/base_inline_renderer.rb
rich_text_renderer-0.2.2 lib/rich_text_renderer/text_renderers/base_inline_renderer.rb
rich_text_renderer-0.2.1 lib/rich_text_renderer/text_renderers/base_inline_renderer.rb
rich_text_renderer-0.2.0 lib/rich_text_renderer/text_renderers/base_inline_renderer.rb
rich_text_renderer-0.1.0 lib/rich_text_renderer/text_renderers/base_inline_renderer.rb