Class: NSBundle
- Defined in:
- ext/accessibility/extras/extras.c,
ext/accessibility/extras/extras.c
Overview
A tiny subset of Cocoa's NSBundle
class. Methods that might be
useful to have have been bridged.
See Apple's Developer Reference for documentation on the methods available in this class.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.bundleWithURL(url) ⇒ Object
410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'ext/accessibility/extras/extras.c', line 410
static
VALUE
rb_bundle_with_url(VALUE self, VALUE url)
{
NSURL* nsurl = unwrap_nsurl(url);
NSBundle* bundle = [NSBundle bundleWithURL:nsurl];
VALUE rb_bundle = Qnil;
if (bundle)
rb_bundle = wrap_bundle(bundle);
return rb_bundle;
}
|
Instance Method Details
#infoDictionary ⇒ Object
424 425 426 427 428 429 430 431 432 433 |
# File 'ext/accessibility/extras/extras.c', line 424
static
VALUE
rb_bundle_info_dict(VALUE self)
{
NSDictionary* dict = [unwrap_bundle(self) infoDictionary];
VALUE hash = Qnil;
if (dict)
hash = wrap_dictionary(dict);
return hash;
}
|
#objectForInfoDictionaryKey(key) ⇒ Object
435 436 437 438 439 440 441 442 443 444 |
# File 'ext/accessibility/extras/extras.c', line 435
static
VALUE
rb_bundle_object_for_info_dict_key(VALUE self, VALUE key)
{
NSString* nskey = unwrap_nsstring(key);
id obj = [unwrap_bundle(self) objectForInfoDictionaryKey:nskey];
if (obj)
return to_ruby(obj);
return Qnil;
}
|