Class: Cocoa::CFRange
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Cocoa::CFRange
- Defined in:
- lib/cocoa/structs/NSRange.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ CFRange
constructor
A new instance of CFRange.
- #to_s ⇒ Object
Constructor Details
#initialize(*args) ⇒ CFRange
Returns a new instance of CFRange.
3 4 5 6 7 8 9 10 11 |
# File 'lib/cocoa/structs/NSRange.rb', line 3 def initialize *args = args.first if .is_a? Hash self[:location] = [:location] self[:length] = [:length] else super *args end end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/cocoa/structs/NSRange.rb', line 12 def to_s "<CFRange: #{self[:location]} #{self[:length]}>" end |