Class: BookLab::SML::Rules::Base

Inherits:
Object
  • Object
show all
Extended by:
EscapeUtils
Includes:
Utils
Defined in:
lib/booklab/sml/rules/base.rb

Constant Summary collapse

INDENT_PX =
8

Class Method Summary collapse

Class Method Details

.match?(node) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/booklab/sml/rules/base.rb', line 18

def self.match?(node)
  false
end

.to_html(node, opts = {}) ⇒ Object



22
23
24
25
26
# File 'lib/booklab/sml/rules/base.rb', line 22

def self.to_html(node, opts = {})
  children = opts[:renderer].children_to_html(node)
  tag = tag_name(node)
  %(<#{tag}>#{children}</#{tag}>)
end

.to_text(node, opts = {}) ⇒ Object



28
29
30
# File 'lib/booklab/sml/rules/base.rb', line 28

def self.to_text(node, opts = {})
  opts[:renderer].children_to_text(node)
end