Sha256: 76f8f847561b39923d92c86504f0e11a8ad6f849405ac8e0a9f80046e685ef20
Contents?: true
Size: 591 Bytes
Versions: 1
Compression:
Stored size: 591 Bytes
Contents
module Powerpoint module Util def pixle_to_pt(px) px * 12700 end def render_view(template_name, path) view_contents = read_template(template_name) renderer = ERB.new(view_contents) data = renderer.result(binding) File.open(path, 'w') { |f| f << data } end def read_template(filename) File.read("#{Powerpoint::VIEW_PATH}/#{filename}") end def require_arguments(required_argements, argements) raise ArgumentError unless required_argements.all? {|required_key| argements.keys.include? required_key} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
powerpoint-1.7 | lib/powerpoint/util.rb |