lib/hexp/node/attributes.rb in hexp-0.4.2 vs lib/hexp/node/attributes.rb in hexp-0.4.3
- old
+ new
@@ -86,10 +86,10 @@
#
# @return [Array<String>]
#
# @api public
def class_list
- (attr('class') || '').split(' ')
+ @class_list ||= (attr('class') || '').split(' ')
end
# Remove a CSS class from this element
#
# If the resulting class list is empty, the class attribute will be