RosettaCodeData/Task/Pangram-checker/Ruby/pangram-checker.rb

7 lines
209 B
Ruby
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
def pangram?(sentence)
2019-09-12 10:33:56 -07:00
('a'..'z').all? {|chars| sentence.downcase.include? (chars) }
2013-04-10 23:57:08 -07:00
end
p pangram?('this is a sentence') # ==> false
p pangram?('The quick brown fox jumps over the lazy dog.') # ==> true