Sha256: 02f8511ae5cdf45f27447784877baa1006e347b645f80d5a3b351b8cdc98c50d

Contents?: true

Size: 284 Bytes

Versions: 9

Compression:

Stored size: 284 Bytes

Contents

module WebConsole
  class View

    require 'erb'

    def load_erb_from_path(path)
      erb = File.new(path).read
      load_erb(erb)
    end

    def load_erb(erb)
      template = ERB.new(erb, nil, '-')
      html = template.result(binding)
      load_html(html)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
webconsole-0.1.12 lib/webconsole/lib/view/erb.rb
webconsole-0.1.11 lib/webconsole/lib/view/erb.rb
webconsole-0.1.10 lib/webconsole/lib/view/erb.rb
webconsole-0.1.5 lib/webconsole/lib/view/erb.rb
webconsole-0.1.4 lib/webconsole/lib/view/erb.rb
webconsole-0.1.3 lib/webconsole/lib/view/erb.rb
webconsole-0.1.2 lib/webconsole/lib/view/erb.rb
webconsole-0.1.1 lib/webconsole/lib/view/erb.rb
webconsole-0.1.0 lib/webconsole/lib/view/erb.rb