Class: DBus::Type::ArrayFactory

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

Overview

Syntactic helper for constructing an array Type. You may be looking for Data::Array instead.

Examples:

t = Type::Array[Type::INT16]

Class Method Summary collapse

Methods inherited from Factory

from_plain_class, make_type

Class Method Details

.[](member_type) ⇒ Type

Returns (frozen).

Parameters:

Returns:

  • (Type)

    (frozen)



332
333
334
335
336
337
# File 'lib/dbus/type.rb', line 332

def self.[](member_type)
  t = Type.new(ARRAY)
  t << make_type(member_type)
  t.members.freeze
  t
end