Module: Shift::Generator
- Defined in:
- lib/shift-lang/generator.rb,
lib/shift-lang/generator/ruby_generator.rb,
lib/shift-lang/generator/ruby_templates.rb,
lib/shift-lang/generator/python_generator.rb,
lib/shift-lang/generator/python_templates.rb,
lib/shift-lang/generator/javascript_generator.rb,
lib/shift-lang/generator/javascript_templates.rb
Defined Under Namespace
Modules: JavaScriptTemplates, PythonTemplates, RubyTemplates
Classes: JavaScriptGenerator, PythonGenerator, RubyGenerator
Class Method Summary
collapse
Class Method Details
.generateJavaScript(files) ⇒ Object
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/shift-lang/generator.rb', line 29
def Generator::generateJavaScript(files)
generator = Shift::Generator::JavaScriptGenerator.new
files.each { | file | generator.get_data_from_file file }
if(generator.builder.clean)
generator.write_data
else
""
end
end
|
.generatePython(files) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/shift-lang/generator.rb', line 7
def Generator::generatePython(files)
generator = Shift::Generator::PythonGenerator.new
files.each { | file | generator.get_data_from_file file }
if(generator.builder.clean)
generator.write_data
else
""
end
end
|
.generateRuby(files) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/shift-lang/generator.rb', line 18
def Generator::generateRuby(files)
generator = Shift::Generator::RubyGenerator.new
files.each { | file | generator.get_data_from_file file }
if(generator.builder.clean)
generator.write_data
else
""
end
end
|