Sha256: aefb1683934b28fd1e2f66c64920ecf733a56eec18fc8e3c308505694efc8990
Contents?: true
Size: 897 Bytes
Versions: 12
Compression:
Stored size: 897 Bytes
Contents
module Qcmd module QLab class Reply < Struct.new(:osc_message) def json @json ||= begin Qcmd.debug "[Reply json] parsing osc_message #{ osc_message.to_a.inspect }" JSON.parse(osc_message.to_a.first) rescue => ex Qcmd.debug "[Reply json] json parsing of osc_message failed on message #{ osc_message.to_a.inspect }. #{ ex.message }" {} end end def address @address ||= json['address'] end def data @data ||= json['data'] end def has_data? !data.nil? end def status @status ||= json['status'] end def empty? false end def to_s "<Qcmd::Qlab::Reply address:'#{address}' status:'#{status}' data:#{data.inspect}>" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems