Sha256: 0c7b5a3913ec0c59425f59863bdd7fbee51ab750be136f20c96d457f392af66c
Contents?: true
Size: 884 Bytes
Versions: 20
Compression:
Stored size: 884 Bytes
Contents
require 'ronin/templates/template' class ExampleTemplate include Ronin::Templates::Template def enter_example_template(&block) enter_template(File.join('templates','example.erb'),&block) end def enter_relative_template(&block) enter_template(File.join('templates','example.erb')) do |path| enter_template(File.join('..','includes','_relative.erb'),&block) end end def enter_missing_template(&block) enter_template('totally_missing.erb',&block) end def read_example_template(&block) read_template(File.join('templates','example.erb'),&block) end def read_relative_template(&block) read_template(File.join('templates','example.erb')) do |contents| read_template(File.join('..','includes','_relative.erb'),&block) end end def read_missing_template(&block) read_template('totally_missing.erb',&block) end end
Version data entries
20 entries across 20 versions & 1 rubygems