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.



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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



76
77
78
# File 'lib/dbus/introspect.rb', line 76

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



77
78
79
# File 'lib/dbus/introspect.rb', line 77

def type
  @type
end

Instance Method Details

#[](index) ⇒ Object

backward compatibility, deprecated



85
86
87
88
89
90
# File 'lib/dbus/introspect.rb', line 85

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