Sha256: 96cd4c10ead81b4103eabef9463b0eb698d36fa2bc9c7e6578c21990c39bc800

Contents?: true

Size: 528 Bytes

Versions: 6

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

require "action_view"
require "action_view/helpers"
require "sanitize"

module RenderEditorjs
  module Blocks
    class Base
      include ActionView::Helpers::TagHelper
      include ActionView::Helpers::TextHelper

      # ActionView::Helpers::TagHelper requires output_buffer accessor
      attr_accessor :raw, :output_buffer

      def valid?(data)
        validator(data).valid?
      end

      def validator(data)
        Validator.new(data, self.class::SCHEMA)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
render_editorjs-0.1.5 lib/render_editorjs/blocks/base.rb
render_editorjs-0.1.4 lib/render_editorjs/blocks/base.rb
render_editorjs-0.1.3 lib/render_editorjs/blocks/base.rb
render_editorjs-0.1.2 lib/render_editorjs/blocks/base.rb
render_editorjs-0.1.1 lib/render_editorjs/blocks/base.rb
render_editorjs-0.1.0 lib/render_editorjs/blocks/base.rb