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



386
387
388
389
390
391
392
393
394
# File 'ext/accessibility/extras/extras.c', line 386

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

.currentHostObject



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

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

.localizedNameObject



396
397
398
399
400
401
402
403
404
# File 'ext/accessibility/extras/extras.c', line 396

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



376
377
378
379
380
381
382
383
384
# File 'ext/accessibility/extras/extras.c', line 376

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