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



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

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

.currentHostObject



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

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

.localizedNameObject



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

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



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

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