class Parsers::DownloadAudioFileResponse
Attributes
error[RW]
success[RW]
Public Class Methods
new(body)
click to toggle source
# File lib/slybroadcast/parsers/download_audio_file_response.rb, line 6 def initialize(body) response_parse(body) end
Public Instance Methods
failed?()
click to toggle source
# File lib/slybroadcast/parsers/download_audio_file_response.rb, line 10 def failed? not success? end
success?()
click to toggle source
# File lib/slybroadcast/parsers/download_audio_file_response.rb, line 14 def success? success end
Private Instance Methods
response_parse(body)
click to toggle source
# File lib/slybroadcast/parsers/download_audio_file_response.rb, line 20 def response_parse(body) response = body.split("\n") @success = response[0].strip == 'OK' @error = response[1].strip unless success end