Sha256: 7f687e148ceb130b4ec9f04490b35d58c2c70fb587c2dc6ff18bcb1ef0a4ee0a
Contents?: true
Size: 434 Bytes
Versions: 1
Compression:
Stored size: 434 Bytes
Contents
module Stevenson module Input class Email < Text include Base def collect! # Ask the user the question and apply the appropriate options answer = ask(@prompt) do |q| q.default = default q.validate = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i q.limit = @limit if @limit end # Return the user's answer answer.to_s end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stevenson-1.0.1 | lib/stevenson/input/email.rb |