Class: Leeloo::TranslateController
Instance Method Summary
collapse
#initialize
Instance Method Details
#display ⇒ Object
114
115
116
|
# File 'lib/leeloo/controller.rb', line 114
def display
@output.render_text @text
end
|
#translate ⇒ Object
104
105
106
107
108
109
110
111
112
113
|
# File 'lib/leeloo/controller.rb', line 104
def translate
@text = STDIN.read
@text.scan(/\$\{.*\}/).each do |secret|
begin
@text.gsub! secret, (@keystore.secret_from_name(secret[2..-2])).read.to_s.strip
rescue => exception
end
end
end
|