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

Version Path
ronin-support-0.5.2 spec/templates/classes/example_template.rb
ronin-support-0.5.1 spec/templates/classes/example_template.rb
ronin-support-0.5.0 spec/templates/classes/example_template.rb
ronin-support-0.5.0.rc2 spec/templates/classes/example_template.rb
ronin-support-0.5.0.rc1 spec/templates/classes/example_template.rb
ronin-support-0.4.1 spec/templates/classes/example_template.rb
ronin-support-0.4.0 spec/templates/classes/example_template.rb
ronin-support-0.4.0.rc2 spec/templates/classes/example_template.rb
ronin-support-0.4.0.rc1 spec/templates/classes/example_template.rb
ronin-support-0.3.0 spec/templates/classes/example_template.rb
ronin-support-0.2.0 spec/templates/classes/example_template.rb
ronin-support-0.2.0.rc2 spec/templates/classes/example_template.rb
ronin-support-0.2.0.rc1 spec/templates/classes/example_template.rb
ronin-support-0.1.0 spec/templates/classes/example_template.rb
ronin-support-0.1.0.rc3 spec/templates/classes/example_template.rb
ronin-support-0.1.0.rc2 spec/templates/classes/example_template.rb
ronin-support-0.1.0.rc1 spec/templates/classes/example_template.rb
ronin-support-0.1.0.pre3 spec/templates/classes/example_template.rb
ronin-support-0.1.0.pre2 spec/templates/classes/example_template.rb
ronin-support-0.1.0.pre1 spec/templates/classes/example_template.rb