class SDL::Mac::ObjC::NSString
Public Class Methods
new( str_or_ptr )
click to toggle source
Calls superclass method
# File lib/ruby-sdl-ffi/sdl/mac.rb, line 206 def initialize( str_or_ptr ) if str_or_ptr.is_a? String super( ObjC::NSClass("NSString"). msg_ptr("stringWithUTF8String:", FFI.find_type(:string), str_or_ptr) ) else super end end
Public Instance Methods
to_s()
click to toggle source
# File lib/ruby-sdl-ffi/sdl/mac.rb, line 216 def to_s str = msg_ptr( "UTF8String" ) (str.null?) ? "(NULL)" : str.read_string() end