Sha256: ff6d1fe91452ec532099cf9ce571c6a90c70c1e749948b63373a33795c2d33b1
Contents?: true
Size: 474 Bytes
Versions: 8
Compression:
Stored size: 474 Bytes
Contents
module Osheet::StyledElement def style_class(value); set_ivar(:style_class, verify_style_class(value)); end private def verify_style_class(style_class) if !style_class.kind_of?(::String) || invalid_style_class?(style_class) raise ArgumentError, "invalid style_class: '#{style_class}', cannot contain '.' or '>'" else style_class end end def invalid_style_class?(style_class) style_class =~ /\.+/ || style_class =~ />+/ end end
Version data entries
8 entries across 8 versions & 1 rubygems