Class: DBus::FormalParameter

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

Overview

A formal parameter has a name and a type

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type) ⇒ FormalParameter

Returns a new instance of FormalParameter.



83
84
85
86
# File 'lib/dbus/introspect.rb', line 83

def initialize(name, type)
  @name = name
  @type = type
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



80
81
82
# File 'lib/dbus/introspect.rb', line 80

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



81
82
83
# File 'lib/dbus/introspect.rb', line 81

def type
  @type
end

Instance Method Details

#[](index) ⇒ Object

backward compatibility, deprecated



89
90
91
92
93
94
# File 'lib/dbus/introspect.rb', line 89

def [](index)
  case index
  when 0 then name
  when 1 then type
  end
end