class TFClient::Models::StatusReport
Attributes
hash[R]
Public Class Methods
new(lines:)
click to toggle source
# File lib/textflight-client/models/status_report.rb, line 12 def initialize(lines:) if lines[0] != STATUS_BEGIN raise "Expected lines[0] to be == #{STATUS_BEGIN}, found: #{lines[0]}" end @hash = {} lines.each do |line| break if line == STATUS_END tokens = line.strip.split(": ") @hash[tokens[0].to_sym] = tokens[1] end end