Class: Barrister::Interface

Inherits:
Object
  • Object
show all
Defined in:
lib/barrister.rb

Overview

Represents a Barrister IDL “interface”

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(iface) ⇒ Interface

Returns a new instance of Interface.



845
846
847
848
849
850
851
# File 'lib/barrister.rb', line 845

def initialize(iface)
  @name = iface["name"]
  @functions = { }
  iface["functions"].each do |f|
    @functions[f["name"]] = Function.new(f)
  end
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



843
844
845
# File 'lib/barrister.rb', line 843

def name
  @name
end

Instance Method Details

#function(name) ⇒ Object



857
858
859
# File 'lib/barrister.rb', line 857

def function(name)
  return @functions[name]
end

#functionsObject



853
854
855
# File 'lib/barrister.rb', line 853

def functions
  return @functions.values
end