Class: Rmsgen::Script
- Inherits:
-
Object
- Object
- Rmsgen::Script
- Defined in:
- lib/rmsgen/script.rb
Instance Method Summary collapse
- #announce(message) ⇒ Object
-
#initialize(stdout = $stdout) ⇒ Script
constructor
A new instance of Script.
- #prompt_for_expiry_date ⇒ Object
- #prompt_for_polnote_link(part) ⇒ Object
- #prompt_for_text ⇒ Object
- #prompt_for_title ⇒ Object
Constructor Details
#initialize(stdout = $stdout) ⇒ Script
Returns a new instance of Script.
3 4 5 |
# File 'lib/rmsgen/script.rb', line 3 def initialize(stdout=$stdout) @stdout = stdout end |
Instance Method Details
#announce(message) ⇒ Object
24 25 26 27 |
# File 'lib/rmsgen/script.rb', line 24 def announce @stdout.puts @stdout.puts end |
#prompt_for_expiry_date ⇒ Object
7 8 9 |
# File 'lib/rmsgen/script.rb', line 7 def prompt_for_expiry_date prompt "What day does it expire? ex) 08 July 2011:\n " end |
#prompt_for_polnote_link(part) ⇒ Object
15 16 17 18 |
# File 'lib/rmsgen/script.rb', line 15 def prompt_for_polnote_link part label = part[1..-2] + "?:\n" prompt("What is the #{label}") end |
#prompt_for_text ⇒ Object
11 12 13 |
# File 'lib/rmsgen/script.rb', line 11 def prompt_for_text prompt "What is the text?" end |
#prompt_for_title ⇒ Object
20 21 22 |
# File 'lib/rmsgen/script.rb', line 20 def prompt_for_title prompt "Type title:" end |