lib/sugarcube/symbol.rb in sugarcube-0.6 vs lib/sugarcube/symbol.rb in sugarcube-0.6.1

- old
+ new

@@ -228,14 +228,10 @@ end public def uidevice look_in(Symbol.devices) - if Symbol.devices[self] - return Symbol.devices[self] - end - raise SugarNotFoundException.new(self) end def uitextalignment look_in(Symbol.textalignments) end @@ -303,11 +299,11 @@ def uifont(size=UIFont.systemFontSize) # system fonts if Symbol.system_fonts.has_key? self font = look_in(Symbol.system_fonts) - if Symbol === size + if size.is_a? Symbol size = Symbol.font_sizes.fetch(size).uifontsize end font = UIFont.send(font, size) else size = look_in(font_sizes).uifontsize @@ -316,10 +312,10 @@ font end def uifontsize size = look_in(Symbol.system_fonts) - if Symbol === size + if size.is_a? Symbol return UIFont.send(Symbol.font_sizes[self]) end return size.to_f end