lib/osheet/styled_element.rb in osheet-0.10.0 vs lib/osheet/styled_element.rb in osheet-1.0.0.rc.1

- old
+ new

@@ -1,6 +1,14 @@ +module Osheet; end module Osheet::StyledElement - def style_class(value); set_ivar(:style_class, verify_style_class(value)); end + + def style_class(value=nil) + if value.nil? + instance_variable_get("@style_class") + else + instance_variable_set("@style_class", verify_style_class(value)) + end + end private def verify_style_class(style_class) if !style_class.kind_of?(::String) || invalid_style_class?(style_class)