Class: DBus::FormalParameter
- Inherits:
-
Object
- Object
- DBus::FormalParameter
- Defined in:
- lib/dbus/introspect.rb
Overview
A formal parameter has a name and a type
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#[](index) ⇒ Object
backward compatibility, deprecated.
-
#initialize(name, type) ⇒ FormalParameter
constructor
A new instance of FormalParameter.
Constructor Details
#initialize(name, type) ⇒ FormalParameter
Returns a new instance of FormalParameter.
85 86 87 88 |
# File 'lib/dbus/introspect.rb', line 85 def initialize(name, type) @name = name @type = type end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
82 83 84 |
# File 'lib/dbus/introspect.rb', line 82 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
83 84 85 |
# File 'lib/dbus/introspect.rb', line 83 def type @type end |
Instance Method Details
#[](index) ⇒ Object
backward compatibility, deprecated
91 92 93 94 95 96 97 |
# File 'lib/dbus/introspect.rb', line 91 def [](index) case index when 0 then name when 1 then type else nil end end |