lib/iron/web/html/element.rb in iron-web-1.0.0 vs lib/iron/web/html/element.rb in iron-web-1.0.1
- old
+ new
@@ -17,9 +17,12 @@
# span.render # Converts to html string
# => '<span id="title-text" style="color: #f00;">some text</span>
#
class Html
class Element
+ # Remove everything that would normally come from Object and Kernel etc. so our attrs can be anything
+ instance_methods.each { |m| undef_method m if m =~ /^[a-z0-9]+=?$/ }
+
# Add back in our accessors
attr_accessor :tag, :attrs
# Commonly empty tags
SINGLETON_SET = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source'].freeze