Sha256: 90ee7cf8c1a6119034f30e57c2b27bab5db0e9bab265a5238b1c3e6e3a88772c
Contents?: true
Size: 878 Bytes
Versions: 10
Compression:
Stored size: 878 Bytes
Contents
# frozen_string_literal: true module Kitchen # An element for an example # class ExerciseElement < ElementBase # Creates a new +ExerciseElement+ # # @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: ExerciseElementEnumerator) end # Returns the short type # @return [Symbol] # def self.short_type :exercise end # Returns the enumerator for problem. # # @return ElementEnumerator # def problem first("div[data-type='problem']") end # Returns the enumerator for solution. # # @return ElementEnumerator # def solution first("div[data-type='solution']") end end end
Version data entries
10 entries across 10 versions & 1 rubygems