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.



126
127
128
129
# File 'lib/dbus/introspect.rb', line 126

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

Instance Attribute Details

#name#to_s (readonly)

Returns:

  • (#to_s)


122
123
124
# File 'lib/dbus/introspect.rb', line 122

def name
  @name
end

#typeSingleCompleteType (readonly)

Returns:



124
125
126
# File 'lib/dbus/introspect.rb', line 124

def type
  @type
end

Instance Method Details

#[](index) ⇒ Object

backward compatibility, deprecated



132
133
134
135
136
137
# File 'lib/dbus/introspect.rb', line 132

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