Sha256: 79a63b858a44721cbfb1f0cd43237a3886f6757c8f8a27027ba1aaa58e6e54c8

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

class JsTestServer::Server::Representations::Suite < JsTestServer::Server::Representations::Page
  class << self
    def project_js_files
      @@project_js_files ||= []
    end

    def project_js_files=(files)
      @@project_js_files = files
    end

    def project_css_files
      @@project_css_files ||= []
    end

    def project_css_files=(files)
      @@project_css_files = files
    end
  end

  needs :spec_files
  attr_reader :spec_files
  protected

  def title_text
    "Js Test Core Suite"
  end

  def head_content
    project_js_files
    project_css_files
    spec_script_elements
  end

  def spec_script_elements
    spec_files.each do |file|
      script :type => "text/javascript", :src => file
    end
  end

  def project_js_files
    self.class.project_js_files.each do |file|
      script :src => file, :type => "text/javascript"
    end
  end

  def project_css_files
    self.class.project_css_files.each do |file|
      link :href => file, :type => "text/css", :media => "screen", :rel => "stylesheet"
    end
  end

  def body_content
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
js-test-server-0.2.1 lib/js_test_server/server/representations/suite.html.rb
js-test-server-0.2.0 lib/js_test_server/server/representations/suite.html.rb