Class Irmo::InterfaceSpec
In: rbirmo.c
Parent: Object
Methods
each_class    each_method    get_class    get_method    initialize    method    new   
Public Class methods
new(VALUE klass, VALUE filename)

Create a new InterfaceSpec object, loading the Interface Specification from a file.

  # Load from 'rockets.if'

  ifspec = Irmo::InterfaceSpec.new('rockets.if')
Public Instance methods
initialize(p1)
method(VALUE self, VALUE name)

Get a particular method in the specification by name

  # get the method named 'jump'

  method = ifspec.get_method['jump']
get_method(VALUE self, VALUE name)

Get a particular method in the specification by name

  # get the method named 'jump'

  method = ifspec.get_method['jump']
get_class(VALUE self, VALUE name)

Get a particular class by name

  # Get the class named 'Rocket'

  myclass = ifspec.get_class['Rocket']
each_method(VALUE self)

Iterate over all the methods in the specification

  ifspec.each_method { |method| ... }
each_class(VALUE self)

Iterate over all the classes in the specification

  ifspec.each_class { |cls| ... }