pangram.rb

1
2
3
4
5
6
7
8
9
10
11
12
require 'set'

class Pangram
  VERSION = 1

  @@alphabet = Set.new('a'..'z')

  def self.is_pangram?(text)
    letters = Set.new(text.downcase.split(''))
    return letters >= @@alphabet
  end
end

@kotp and @Vladcz think this looks great

Comments


You're not logged in right now. Please login via GitHub to comment