Sha256: 3cb9612891d891d3c29464b6ab8734a05f62d444d6259305e5e648d2868207f5

Contents?: true

Size: 658 Bytes

Versions: 72

Compression:

Stored size: 658 Bytes

Contents

class StandardTemplate < MetricFu::Template


  def write
    report.each_pair do |section, contents|
      if template_exists?(section)
        create_instance_var(section, contents)
        html = erbify(section)
        fn = output_filename(section)
        MetricFu.report.save_output(html, MetricFu.output_directory, fn)
      end
    end

    # Instance variables we need should already be created from above
    if template_exists?('index')
      html = erbify('index')
      fn = output_filename('index')
      MetricFu.report.save_output(html, MetricFu.output_directory, fn)
    end
  end

  def this_directory
    File.dirname(__FILE__)
  end
end

Version data entries

72 entries across 72 versions & 22 rubygems

Version Path
IPGlider-metric_fu-1.1.5.1.1 lib/templates/standard/standard_template.rb
IPGlider-metric_fu-1.1.5.1 lib/templates/standard/standard_template.rb
alexrothenberg-metric_fu-1.0.2 lib/templates/standard/standard_template.rb
cayblood-metric_fu-1.1.6 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.2 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.3.3 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.3.4 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.3.5 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.3.6 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.3.7 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.3.8 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.4.1 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.4.2 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.4.3 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.4.4 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.4.5 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.0.4 lib/templates/standard/standard_template.rb
edouard-metric_fu-1.1.1 lib/templates/standard/standard_template.rb
gforces-metric_fu-1.1.4 lib/templates/standard/standard_template.rb
iain-metric_fu-0.1.0 lib/templates/standard/standard_template.rb