### Home Classes Methods

### In Files

- lib/dbus/introspect.rb

### Parent

Object

### Methods

- ::new
- #add_fparam
- #add_param
- #validate_name

### Files

- README

### Class/Module Index

Quicksearch

- DBus
- DBus::ASessionBus
- DBus::ASystemBus
- DBus::AuthenticationFailed
- DBus::Authenticator
- DBus::Client
- DBus::Connection
- DBus::Connection::NameRequestError
- DBus::DBusCookieSHA1
- DBus::Error
- DBus::ErrorMessage
- DBus::External
- DBus::FormalParameter
- DBus::IncompleteBufferException
- DBus::Interface
- DBus::InterfaceElement
- DBus::IntrospectXMLParser
- DBus::InvalidClassDefinition
- DBus::InvalidDestinationName
- DBus::InvalidIntrospectionData
- DBus::InvalidMethodName
- DBus::InvalidPacketException
- DBus::InvalidParameters
- DBus::Main
- DBus::MatchRule
- DBus::MatchRuleException
- DBus::Message
- DBus::Method
- DBus::MethodNotImplemented
- DBus::MethodReturnMessage
- DBus::Node
- DBus::Object
- DBus::Object::UndefinedInterface
- DBus::PacketMarshaller
- DBus::PacketUnmarshaller
- DBus::ProxyObject
- DBus::ProxyObjectFactory
- DBus::ProxyObjectInterface
- DBus::RemoteBus
- DBus::Service
- DBus::SessionBus
- DBus::Signal
- DBus::SystemBus
- DBus::Type
- DBus::Type::Parser
- DBus::Type::SignatureException
- DBus::Type::Type
- DBus::TypeException
- DBus::UnknownSignal
- Integer

No matching classes.

# DBus::InterfaceElement

# D-Bus interface element class

This is a generic class for entities that are part of the interface such as methods and signals.

### Attributes

name[R]

The name of the interface element. Symbol

params[R]

The parameters of the interface element. Array: FormalParameter

### Public Class Methods

new(name) click to toggle source

Creates a new element with the given name.

    # File lib/dbus/introspect.rb, line 118
    def initialize(name)
      validate_name(name.to_s)
      @name = name
      @params = Array.new
    end

### Public Instance Methods

add_fparam(name, signature) click to toggle source

Adds a formal parameter with name and signature (See also Message#add_param which takes signature+value)

    # File lib/dbus/introspect.rb, line 126
    def add_fparam(name, signature)
      @params << FormalParameter.new(name, signature)
    end

add_param(name_signature_pair) click to toggle source

Deprecated, for backward compatibility

    # File lib/dbus/introspect.rb, line 131
    def add_param(name_signature_pair)
      add_fparam(*name_signature_pair)
    end

validate_name(name) click to toggle source

Validates element name.

    # File lib/dbus/introspect.rb, line 111
    def validate_name(name)
      if (not name =~ MethodSignalRE) or (name.bytesize > 255)
        raise InvalidMethodName, name
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.