Sha256: 551c54362d6be010d8e029b5d23bed36733a68b54e92fc3d2c8aa27ac3e7f328
Contents?: true
Size: 603 Bytes
Versions: 2
Compression:
Stored size: 603 Bytes
Contents
module ServiceDowntimeSimulator module Modes NotFound = Class.new(StandardError) AVAILABLE = { hard_down: ServiceDowntimeSimulator::Modes::HardDown, intermittently_down: ServiceDowntimeSimulator::Modes::IntermittentlyDown, successful_but_gibberish: ServiceDowntimeSimulator::Modes::SuccessfulButGibberish, timing_out: ServiceDowntimeSimulator::Modes::TimingOut }.freeze def self.for(id) raise NotFound unless exists?(id) AVAILABLE[id] end def self.exists?(id) AVAILABLE.key?(id) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
service_downtime_simulator-0.1.1 | lib/service_downtime_simulator/modes.rb |
service_downtime_simulator-0.1.0 | lib/service_downtime_simulator/modes.rb |