Sha256: 28da809c0eac2526dbfb3da1d3db8e0e15841f80172975debf5362c5cd22a127
Contents?: true
Size: 900 Bytes
Versions: 21
Compression:
Stored size: 900 Bytes
Contents
module Soaspec module TestServer # Handles returning ids dependent on a number of factors # Made to demonstrate creating testing a list of ids class IdManager @developed = false class << self attr_accessor :developed # @return Result depending on num, id and whether '@developed' is set def result_for(num, id) result = undeveloped_id(num, id) unless @developed result || 'true' end # @return [String] true of false depending on num and id def undeveloped_id(num, id) case num when '1', '4', '10' then 'false' if id == '40' when '3', '11', '9' then 'false' if id == '74' when '8', '6', '8' then 'false' if id == '80' when '7', '5', '12' then 'false' if id == '64' else 'true' end end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
soaspec-0.1.5 | lib/soaspec/test_server/id_manager.rb |