Sha256: 311e54e8ee24338faa6aab2f1af106f817f424dd8813a2dcecbe0396a6a9843d

Contents?: true

Size: 338 Bytes

Versions: 1

Compression:

Stored size: 338 Bytes

Contents

require 'erb'

module RomSqlGraph
  class HtmlGeneration
    attr_reader :edges

    def initialize(edges)
      @edges = edges
    end

    def call
      html = ERB.new(File.read("#{File.dirname(__FILE__)}/templates/graph.erb")).result binding
      File.open("#{Dir.pwd}/graph.html", 'w') { |file| file.write(html) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rom_sql_graph-0.2.0 lib/rom_sql_graph/html_generation.rb