| In: |
tk/lib/tk/font.rb
|
| Parent: | Object |
# File tk/lib/tk/font.rb, line 114 def initialize(compound, type) unless compound.kind_of?(TkFont) fail ArgumentError, "a TkFont object is expected for the 1st argument" end @compound = compound case type when 'kanji', 'latin', 'ascii' @type = type else fail ArgumentError, "unknown type '#{type}'" end end
# File tk/lib/tk/font.rb, line 144 def []=(slot, value) @compound.__send__(@type + '_configure', slot, value) value end
# File tk/lib/tk/font.rb, line 130 def clone fail RuntimeError, "cannot clone a descendant font" end
# File tk/lib/tk/font.rb, line 127 def dup fail RuntimeError, "cannot dupulicate a descendant font" end