Sha256: a7bd36cdbbdd4d7f6b3de111118200314812397c0756e154dba2410ae97f177e
Contents?: true
Size: 596 Bytes
Versions: 18
Compression:
Stored size: 596 Bytes
Contents
module Pantograph # Represents a command that is meant to signal the server to do something on the client's behalf # Examples are: :cancelPantographRune, and :done class ControlCommand attr_reader :command attr_reader :user_message attr_reader :reason def initialize(json: nil) @command = json['command'].to_sym @user_message = json['userMessage'] @reason = json['reason'].to_sym if json['reason'] end def cancel_signal? return @command == :cancelPantographRun end def done_signal? return @command == :done end end end
Version data entries
18 entries across 18 versions & 1 rubygems