Module: Steam::Handler::Base::ClassMethods

Defined in:
lib/steam/handler/base.rb

Overview

Inject methods into the hosting class

Instance Method Summary collapse

Instance Method Details

#handled_messagesObject

The list of EMsgs that this handler knows how to handle



66
67
68
# File 'lib/steam/handler/base.rb', line 66

def handled_messages
  @handled_messages ||= []
end

#handles(*args) ⇒ Object

Specify with EMsgs this Handler cares about



71
72
73
74
75
# File 'lib/steam/handler/base.rb', line 71

def handles(*args)
  handled_messages << args.dup.flatten
  handled_messages.flatten!
  handled_messages.uniq!
end