class Kitchen::Element
An one-off element that isn't one of the main elements we have dedicated classes for (like ChapterElement
). Provides a way to set an arbitrary short_type
Public Class Methods
is_the_element_class_for?(_node, **)
click to toggle source
Returns true if this class represents the element for the given node; always false for this generic class
@param node [Nokogiri::XML::Node] the underlying node @return [Boolean]
# File lib/kitchen/element.rb, line 28 def self.is_the_element_class_for?(_node, **) false end
new(node:, document:, short_type: nil)
click to toggle source
Creates a new Element
@param node [Nokogiri::XML::Node] the node this element wraps @param document [Document] this element's document @param short_type [Symbol, String] the type for this element
Calls superclass method
# File lib/kitchen/element.rb, line 15 def initialize(node:, document:, short_type: nil) super(node: node, document: document, enumerator_class: ElementEnumerator, short_type: short_type) end