Sha256: c6969975add6c76971b7270b6ebbe18f96b300559f6872a5aa6b2840895042f9
Contents?: true
Size: 576 Bytes
Versions: 9
Compression:
Stored size: 576 Bytes
Contents
require_relative 'base' module BetterHtml class NodeIterator class Element < Base tokenized_attribute :name attr_reader :attributes attr_accessor :closing, :self_closing alias_method :closing?, :closing alias_method :self_closing?, :self_closing def initialize @name_parts = [] @attributes = [] end def find_attr(wanted) @attributes.each do |attribute| return attribute if attribute.name == wanted end nil end alias_method :[], :find_attr end end end
Version data entries
9 entries across 9 versions & 1 rubygems