Class: Cocoa::CGSize

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/cocoa/structs/NSSize.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CGSize

Returns a new instance of CGSize.



3
4
5
6
7
8
9
10
11
# File 'lib/cocoa/structs/NSSize.rb', line 3

def initialize *args
  options = args.first
  if options.is_a? Hash
    self[:width] = options[:width]
    self[:height] = options[:height]
  else
    super *args
  end
end