Class: NSHost

Inherits:
Object show all
Defined in:
ext/accessibility/extras/extras.c,
ext/accessibility/extras/extras.c

Overview

A large subset of Cocoa's NSHost 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

Class Method Details

.addressesObject



379
380
381
382
383
384
385
386
387
# File 'ext/accessibility/extras/extras.c', line 379

static
VALUE
rb_host_addresses(VALUE self)
{
  NSArray* nsaddrs = [[NSHost currentHost] addresses];
  VALUE    rbaddrs = wrap_array_nsstrings(nsaddrs);
  [nsaddrs release];
  return rbaddrs;
}

.currentHostObject



362
363
364
365
366
367
# File 'ext/accessibility/extras/extras.c', line 362

static
VALUE
rb_host_self(VALUE self)
{
  return self; // hack
}

.localizedNameObject



389
390
391
392
393
394
395
396
397
# File 'ext/accessibility/extras/extras.c', line 389

static
VALUE
rb_host_localized_name(VALUE self)
{
  NSString* name = [[NSHost currentHost] localizedName];
  VALUE  rb_name = wrap_nsstring(name);
  [name release];
  return rb_name;
}

.namesObject

hack



369
370
371
372
373
374
375
376
377
# File 'ext/accessibility/extras/extras.c', line 369

static
VALUE
rb_host_names(VALUE self)
{
  NSArray* nsnames = [[NSHost currentHost] names];
  VALUE    rbnames = wrap_array_nsstrings(nsnames);
  [nsnames release];
  return rbnames;
}