Sha256: 15fe257a607420744eb20b7323eadc402c826262de24562baec6eebf5fa5e329
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 Bytes
Contents
module Bixby class CommandResponse include Jsonify attr_accessor :status, :stdout, :stderr def initialize(params = nil) return if params.nil? or params.empty? params.each{ |k,v| self.send("#{k}=", v) if self.respond_to? "#{k}=" } end def success? @status.to_i == 0 end def error? not success? end def decode MultiJson.load(@stdout) end def decode_stderr MultiJson.load(@stderr) end end # CommandResponse end # Bixby
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bixby_common-0.2.0 | lib/bixby_common/command_response.rb |