Sha256: 0ffcfedf6879fd954ebb9e4610e8bfa31e1fd32e228a586f699a4f0005da6e72
Contents?: true
Size: 899 Bytes
Versions: 11
Compression:
Stored size: 899 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
11 entries across 11 versions & 1 rubygems