Class: Leeloo::TranslateController

Inherits:
PrivateLocalFileSystemController show all
Defined in:
lib/leeloo/controller.rb

Instance Method Summary collapse

Methods inherited from PrivateLocalFileSystemController

#initialize

Constructor Details

This class inherits a constructor from Leeloo::PrivateLocalFileSystemController

Instance Method Details

#displayObject



114
115
116
# File 'lib/leeloo/controller.rb', line 114

def display
	@output.render_text @text
end

#translateObject



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
			# silent
		end
	end
end