Ruby Examples
This commit is contained in:
12
level2/19.rb
Executable file
12
level2/19.rb
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/ruby
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
=begin
|
||||
비밀번호 길이가 8자 이상인지 검사하는 메서드
|
||||
=end
|
||||
|
||||
def password_valid?(pw)
|
||||
pw.length >= 8
|
||||
end
|
||||
|
||||
puts password_valid?("dfjirgaofmrioa") ? "OK" : "Nope"
|
||||
Reference in New Issue
Block a user