Class: LiveFixtures::Export::Template

Inherits:
Struct
  • Object
show all
Defined in:
lib/live_fixtures/export.rb

Overview

Templates allow you to export fixtures containing erb, that will be evaluated at the time of fixture import. You should initialize them with a String containing the erb to evaluate, like

Examples:

A template with export and import times.

Template.new("<%= \"I was exported at #{Time.now} and imported at \" + Time.now.to_s %>")

Instance Attribute Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



16
17
18
# File 'lib/live_fixtures/export.rb', line 16

def code
  @code
end