Sha256: 6d1aef2dd961c7a05846b8319391453ae1f2c6fd44d5dcb1b843c01fd49dc893

Contents?: true

Size: 565 Bytes

Versions: 6

Compression:

Stored size: 565 Bytes

Contents

# -*- coding: utf-8 -*-

require 'erb'

module TurnipFormatter
  class Template
    module StepOutline
      def self.build(table)
        template_step_outline.result(binding)
      end

    private

      def self.template_step_outline
        @template_step_outline ||= ERB.new(<<-EOS)
        <table class="step_outline">
        <% table.each do |tr| %>
          <tr>
            <% tr.each do |td| %>
            <td><%= ERB::Util.h(td) %></td>
            <% end %>
          </tr>
        <% end %>
        </table>
        EOS
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
turnip_formatter-0.1.2 lib/turnip_formatter/template/step_outline.rb
turnip_formatter-0.1.1 lib/turnip_formatter/template/step_outline.rb
turnip_formatter-0.1.0 lib/turnip_formatter/template/step_outline.rb
turnip_formatter-0.0.6 lib/turnip_formatter/template/step_outline.rb
turnip_formatter-0.0.5 lib/turnip_formatter/template/step_outline.rb
turnip_formatter-0.0.4 lib/turnip_formatter/template/step_outline.rb