Class: Konjak::Hilight

Inherits:
InlineElement show all
Defined in:
lib/konjak/highlight.rb

Instance Method Summary collapse

Methods inherited from Element

#__getobj__, #initialize

Constructor Details

This class inherits a constructor from Konjak::Element

Instance Method Details

#can_contain?(element) ⇒ Boolean

FIXME

Text data,
Zero, one or more of the following elements: <bpt>, <ept>, <it>, <ph>, and <hi>.
They can be in any order, except that each <bpt> element must have a subsequent corresponding <ept> element.

Returns:

  • (Boolean)


13
14
15
# File 'lib/konjak/highlight.rb', line 13

def can_contain?(element)
  [String, BeginPairedTag, EndPairedTag, IsolatedTag, Placeholder, Hilight].any? {|c| c === element }
end