Class: ObjC::Class

ObjC::Class wraps Objective-C classes for manipulation from Ruby.

Using methods of this class, Objective-C class methods and instance methods can be accessed from Ruby. New Objective-C classes can be added that subclass existing Objective-C classes; this allows Ruby classes derived from Objective-C classes to be made visible to Objective-C callers. New Objective-C method handlers can be added to allow Objective-C code to call methods written in Ruby.

Information about Objective-C classes obtained from ObjC::Class instances is used to automatically build a tree of Ruby classes descending from ObjC::Object. Instances of these classes wrap individual Objective-C objects.


Public Class methods

each ()

Iterate over all classes currently known to the Objective-C runtime. Classes are returned as ObjC::Class objects.

find (p1)

Lookup an Objective-C class for the given name p1 and return an ObjC::Class wrapper.

hierarchy ()

Get a hash representing the hierarchy of all known Objective-C classes.

to_a ()

Get an array containing all classes currently known to the Objective-C runtime. Classes are returned as ObjC::Class objects.

Public Instance methods

<=> (p1)

Compare the class with another class p1.

== (p1)

Test class for equality with another class p1.

cmethods ()

Get an array containing the class methods of the corresponding Objective-C class. Returns an array of objects of type ObjC::Method.

eql? (p1)

Test class for equality with another class p1.

get_cmethod (p1)

Lookup a class method of the corresponding Objective-C class by name p1.

get_imethod (p1)

Lookup an instance method of the corresponding Objective-C class by name p1.

hash ()

Get a hash value for a class.

imethods ()

Get an array containing the instance methods of the corresponding Objective-C class. Returns an array of objects of type ObjC::Method.

ivars ()

Get an array containing the instance variables associated with the class. Returns an array of objects of type ObjC::Variable.

name ()

Get the name of the corresponding Objective-C class.

protocols ()

Get an array containing the names of all protocols supported by the corresponding Objective-C class.

super ()

Get the superclass of the corresponding Objective-C class.

to_s ()

Get the name of the corresponding Objective-C class.