Sha256: 5cb6e03702cd791e4ebd1cea6fce4c88b70e3d7e44bf0732cfa7377faff25bbb
Contents?: true
Size: 724 Bytes
Versions: 13
Compression:
Stored size: 724 Bytes
Contents
module LearnWeb class Client module Environment class SetupList attr_accessor :data, :steps attr_reader :response include AttributePopulatable def initialize(response) @response = response parse! end private def parse! case response.status when 200 self.data = Oj.load(response.body, symbol_keys: true) self.steps = self.data when 422, 500 puts "Sorry, something went wrong. Please try again." exit else puts "Sorry, something went wrong. Please try again." exit end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems