Class: MatrixQQ::QQ
- Inherits:
-
Object
- Object
- MatrixQQ::QQ
- Defined in:
- lib/matrix_qq/qq/qq.rb,
lib/matrix_qq/qq/log.rb,
lib/matrix_qq/qq/dbus.rb,
lib/matrix_qq/qq/send.rb,
lib/matrix_qq/qq/forward_group/main.rb,
lib/matrix_qq/qq/forward_group/matrix.rb
Defined Under Namespace
Modules: SendGroup Classes: DBus, ForwardGroup, Log
Constant Summary collapse
- SIGN =
i[ private group get_group_list event group_upload group_admin group_decrease group_increase friend_add friend_request join_request invite_request all unknow ].freeze
Instance Attribute Summary collapse
-
#dbus ⇒ Object
readonly
Returns the value of attribute dbus.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#matrix_dbus ⇒ Object
Returns the value of attribute matrix_dbus.
Instance Method Summary collapse
-
#initialize(dbus) ⇒ QQ
constructor
A new instance of QQ.
- #reg ⇒ Object
Constructor Details
#initialize(dbus) ⇒ QQ
Returns a new instance of QQ.
29 30 31 32 |
# File 'lib/matrix_qq/qq/qq.rb', line 29 def initialize(dbus) @dbus = DBus.new dbus reg end |
Instance Attribute Details
#dbus ⇒ Object (readonly)
Returns the value of attribute dbus.
26 27 28 |
# File 'lib/matrix_qq/qq/qq.rb', line 26 def dbus @dbus end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
26 27 28 |
# File 'lib/matrix_qq/qq/qq.rb', line 26 def info @info end |
#matrix_dbus ⇒ Object
Returns the value of attribute matrix_dbus.
27 28 29 |
# File 'lib/matrix_qq/qq/qq.rb', line 27 def matrix_dbus @matrix_dbus end |
Instance Method Details
#reg ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/matrix_qq/qq/qq.rb', line 34 def reg SIGN.each do |i| @dbus.obj.on_signal i.to_s do |json| parse json info = @info QQ.send(i).each do |func| puts "Start #{func.name}" if $VERBOSE func.new(@dbus, @matrix_dbus, info.dup).run puts "End #{func.name}" if $VERBOSE end end end end |