Sha256: dd4eb8bde72c64f9cddfb40651228a29552b24f1e823a9dbcdf709a3359f8a6a
Contents?: true
Size: 539 Bytes
Versions: 1
Compression:
Stored size: 539 Bytes
Contents
require 'haml' require 'ostruct' module RevealCK class HamlProcessor attr_reader :html def initialize(haml) render_context = ::OpenStruct.new({}) engine = ::Haml::Engine.new haml @html = engine.render render_context end def self.open(path) haml_file = if File.exists? path path else File.expand_path(File.join(Dir.pwd, path)) end haml = File.open(haml_file).read HamlProcessor.new haml end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reveal-ck-0.1.3 | lib/reveal-ck/haml_processor.rb |