Sha256: 6e8d80ff4b44cacca1486c946d93f0cf9028e4ffacd179546e8973dbf0937b1c

Contents?: true

Size: 586 Bytes

Versions: 14

Compression:

Stored size: 586 Bytes

Contents

module MatrixQQ
  class Matrix
    class DBus
      attr_reader :obj

      def initialize(dbus)
        srv = dbus.service('org.dastudio.matrix')
        @obj = srv.object '/org/dastudio/matrix'
        @obj.default_iface = 'org.dastudio.matrix'
      end

      def respond_to_missing?(name, include_private = false)
        @obj.respond_to_missing? name, include_private
      end

      def method_missing(name, *args)
        super if args.size > 2
        args << {} if args.size == 1
        JSON.parse @obj.send(name, args[0], args[1].to_json).first
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
matrix_qq-0.5.5 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.5.4 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.5.3 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.5.2 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.5.1 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.5.0 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.4.0 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.3.3 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.3.2 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.3.1 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.3.0 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.2.1 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.2.0 lib/matrix_qq/matrix/dbus.rb
matrix_qq-0.1.1 lib/matrix_qq/matrix/dbus.rb