diff options
Diffstat (limited to 'new/lib/crys/renderer.rb')
-rw-r--r-- | new/lib/crys/renderer.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/new/lib/crys/renderer.rb b/new/lib/crys/renderer.rb deleted file mode 100644 index c490330..0000000 --- a/new/lib/crys/renderer.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'erb' -require 'pry' - -module Crys - module Splash - class Theme - PARENT_DIR = File.expand_path(".", Dir.pwd) - - def render - template = ERB.new(File.read(PARENT_DIR + "/theme/" + self.class::PAGE)) - template.result(local_binding) - end - - def body - self.class::BODY.result(local_binding) - end - - private - - attr_accessor :template, :data - - def local_binding - local_binding = binding.clone - self.class::DATA.each do |k, v| - local_binding.local_variable_set(k,v) - end - local_binding - - end - end - end -end |