Sha256: b3d694a22e66f54e55720bdad14d523c48602d8ce38fb688b6ed119010603699
Contents?: true
Size: 1019 Bytes
Versions: 10
Compression:
Stored size: 1019 Bytes
Contents
# frozen_string_literal: true module Kitchen # An element for an example # class ExampleElement < ElementBase # Creates a new +ExampleElement+ # # @param node [Nokogiri::XML::Node] the node this element wraps # @param document [Document] this element's document # def initialize(node:, document: nil) super(node: node, document: document, enumerator_class: ExampleElementEnumerator) end # Returns the short type # @return [Symbol] # def self.short_type :example end # Returns the an enumerator for titles. # # @return [ElementEnumerator] # def titles_to_rename titles(except: \ lambda do |title| title.parent.has_class?('os-caption-container') || \ title.parent.has_class?('os-caption') || \ title.parent.name == 'caption' || \ title.parent.data_type == 'note' || \ title.parent.data_type == 'exercise' end ) end end end
Version data entries
10 entries across 10 versions & 1 rubygems