class StreamPreparator

Describes stream methods init, read, write (separate class is to to avoid name conflicts).

Public Class Methods

new(context, template) click to toggle source
# File template.rb, line 1310
def initialize context, template
  @context = context
  @template = template
end

Public Instance Methods

init(&contents) click to toggle source
# File template.rb, line 1315
def init(&contents)
  @template.beginStreamInitMethod
  @context.instance_eval &contents
  @template.endStreamMethod
end
read(&contents) click to toggle source
# File template.rb, line 1321
def read(&contents)
  @template.beginStreamReadMethod
  @context.instance_eval &contents
  @template.endStreamMethod
end
write(&contents) click to toggle source
# File template.rb, line 1327
def write(&contents)
  @template.beginStreamWriteMethod
  @context.instance_eval &contents
  @template.endStreamMethod
end