class HOM::Entity
Attributes
value[R]
Public Class Methods
new(value)
click to toggle source
# File lib/hom.rb, line 9 def initialize(value) @value = value end
Public Instance Methods
+(object)
click to toggle source
# File lib/hom.rb, line 29 def +(object) NodeList.new([self, object]) end
html_safe?()
click to toggle source
# File lib/hom.rb, line 25 def html_safe? true end
named?()
click to toggle source
# File lib/hom.rb, line 21 def named? !numeric? end
numeric?()
click to toggle source
# File lib/hom.rb, line 17 def numeric? Numeric === @value end
to_s()
click to toggle source
# File lib/hom.rb, line 13 def to_s numeric? ? "&\##{value};" : "&#{value};" end