Sha256: 2eefecaade3de66af0e5f153244ce3405530262942c009c2265a6589a203697e
Contents?: true
Size: 448 Bytes
Versions: 105
Compression:
Stored size: 448 Bytes
Contents
require 'generator/exercise_case' class IsogramCase < Generator::ExerciseCase def workload indent_lines( [ "string = #{input.inspect}", "#{assert} Isogram.isogram?(string), #{failure_message}" ], 4 ) end private def failure_message %Q("Expected #{expected}, #{reason}") end def reason "'#{input}' #{is_or_not} an isogram" end def is_or_not expected ? 'is' : 'is not' end end
Version data entries
105 entries across 105 versions & 1 rubygems