Class: Jib::Document

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

Instance Method Summary collapse

Instance Method Details

#get_bindingObject



179
180
181
# File 'lib/jib.rb', line 179

def get_binding
  binding
end

#sourcesObject



171
172
173
# File 'lib/jib.rb', line 171

def sources
  filenames(Jib.config.sources, Jib.config.source_path)
end

#specsObject



175
176
177
# File 'lib/jib.rb', line 175

def specs
  filenames(Jib.config.specs, Jib.config.spec_path)
end

#templateObject



159
160
161
162
163
# File 'lib/jib.rb', line 159

def template
  ERB.new(
    File.read(template_file_path)
  ).result(self.get_binding)
end

#write_to_fileObject



165
166
167
168
169
# File 'lib/jib.rb', line 165

def write_to_file
  File.open(File.join(Jib.workspace_path, "test-runner.html"), "w+") { |file|
    file << template
  }
end