Class: Entityjs::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/entityjs/page.rb

Class Method Summary collapse

Class Method Details

.processor_extObject



6
7
8
# File 'lib/entityjs/page.rb', line 6

def self.processor_ext
  return '.js'
end

.render_entityjs_src(path) ⇒ Object



18
19
20
21
22
# File 'lib/entityjs/page.rb', line 18

def self.render_entityjs_src(path)
  path = Entityjs::root+'/src/'+path
  
  return IO.read(path)
end

.render_eunit(path) ⇒ Object



35
36
37
# File 'lib/entityjs/page.rb', line 35

def self.render_eunit(path)
  IO.read(Entityjs::root+"/public/qunit/#{path}")
end

.render_playObject



10
11
12
# File 'lib/entityjs/page.rb', line 10

def self.render_play
  self.set_vars("play.html")
end

.render_script(path) ⇒ Object



30
31
32
33
# File 'lib/entityjs/page.rb', line 30

def self.render_script(path)
  file = path.sub(/#{self.processor_ext}$/i, '');
  return Compile.script_to_js(file)
end

.render_test(path) ⇒ Object



24
25
26
27
28
# File 'lib/entityjs/page.rb', line 24

def self.render_test(path)
  file = path.sub(/#{self.processor_ext}$/i, '');
  
  return Compile.test_to_js(file)
end

.render_testsObject



14
15
16
# File 'lib/entityjs/page.rb', line 14

def self.render_tests
  self.set_vars('tests.html', true)
end