Class: Tane::Commands::Support
- Defined in:
- lib/tane/commands/support.rb
Class Method Summary collapse
- .email_from_credentials_or_prompt ⇒ Object
- .help_text ⇒ Object
- .process(args) ⇒ Object
- .send_message_to_cloudfuji(message) ⇒ Object
Methods inherited from Base
Methods included from Helpers
Class Method Details
.email_from_credentials_or_prompt ⇒ Object
21 22 23 24 |
# File 'lib/tane/commands/support.rb', line 21 def email_from_credentials_or_prompt return username if logged_in? return term.ask("And your email address is: ") end |
.help_text ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/tane/commands/support.rb', line 26 def help_text <<-EOL Usage: tane support Prompts you for a message to send to the Cloudfuji team. EOL end |
.process(args) ⇒ Object
3 4 5 6 |
# File 'lib/tane/commands/support.rb', line 3 def process(args) = term.ask("Your message to the Cloudfuji clan: ") () end |
.send_message_to_cloudfuji(message) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/tane/commands/support.rb', line 8 def () support_data = {} support_data[:source] = "tane" support_data[:email] = email_from_credentials_or_prompt support_data[:message] = RestClient.post support_url, support_data term.say("Send the cloudfuji team your message:") term.say("\t#{}") term.say("Boy are they gonna be excited to hear from you, #{support_data[:email]}") end |