PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/get_text/library/library.e

http://github.com/tybor/Liberty
Specman e | 34 lines | 28 code | 6 blank | 0 comment | 0 complexity | 1277612bbc0924f8a7909e0ad07f02ca MD5 | raw file
 1class LIBRARY
 2
 3creation {ANY}
 4	make
 5
 6feature {ANY}
 7	print_hello is
 8		do
 9			io.put_string(translator.translation("Hello from the library"))
10			io.put_new_line
11		end
12
13feature {}
14	make (translator_: GET_TEXT[STRING]) is
15		require
16			translator_ /= Void
17		local
18			library_translator: LIBRARY_TRANSLATOR
19		do
20			create library_translator.connect_to(translator_)
21			translator_reference.set_item(library_translator)
22		end
23
24	translator: LIBRARY_TRANSLATOR is
25		do
26			Result := translator_reference.item
27		end
28
29	translator_reference: REFERENCE[LIBRARY_TRANSLATOR] is
30		once
31			create Result
32		end
33
34end -- class LIBRARY