Sha256: d0930c199edd7a9cf5d01a63101306fab948e1f61c8cc8e539af06fa79b39c88
Contents?: true
Size: 418 Bytes
Versions: 6
Compression:
Stored size: 418 Bytes
Contents
module RichTextRenderer # Base class for all NodeRenderers class BaseNodeRenderer attr_reader :mappings def initialize(mappings = {}) @mappings = mappings end protected def find_renderer(node) renderer = mappings[node['nodeType']] return mappings[nil].new(mappings) if renderer.nil? && mappings.key?(nil) renderer.new(mappings) unless renderer.nil? end end end
Version data entries
6 entries across 6 versions & 1 rubygems