Class: Rmsgen::Script

Inherits:
Object
  • Object
show all
Defined in:
lib/rmsgen/script.rb

Instance Method Summary collapse

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 message 
  @stdout.puts message
  @stdout.puts
end

#prompt_for_expiry_dateObject



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


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_textObject



11
12
13
# File 'lib/rmsgen/script.rb', line 11

def prompt_for_text
  prompt "What is the text?"
end

#prompt_for_titleObject



20
21
22
# File 'lib/rmsgen/script.rb', line 20

def prompt_for_title
  prompt "Type title:"
end