Class: Hitch::UI
- Inherits:
-
Object
- Object
- Hitch::UI
- Defined in:
- lib/hitch/ui.rb
Class Method Summary collapse
Class Method Details
.prompt_for_group_email ⇒ Object
6 7 8 9 10 11 |
# File 'lib/hitch/ui.rb', line 6 def self.prompt_for_group_email Hitch.group_email = highline.ask("What is the group email? e.g. [email protected] will become [email protected]") do |q| q.case = :down q.validate = /\A[a-zA-Z0-9_\.\-\+]+@[a-zA-Z1-9\-]+\.[a-zA-Z0-9\-\.]+\z/ end.to_s end |
.prompt_for_pair(new_author) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/hitch/ui.rb', line 13 def self.prompt_for_pair() highline.say("I don't know who #{} is.") if highline.agree("Do you want to add #{} to ~/.hitch_pairs?") = highline.ask("What is #{}'s full name?").to_s Hitch::Author.add(, ) Hitch::Author.write_file return else highline.say("Ignoring #{}.") end return nil end |