### Home Classes Methods

### In Files

- lib/rye.rb

### Parent

Object

### Methods

- ::new
- #delete
- #path
- #result!
- #to_s

### Files

- LICENSE.txt
- README.rdoc

### Class/Module Index

Quicksearch

- Rye
- Rye::Box
- Rye::Box::InstanceExecHelper
- Rye::Cmd
- Rye::CommandNotFound
- Rye::Err
- Rye::Hop
- Rye::Key
- Rye::Key::BadFile
- Rye::Key::BadPerm
- Rye::NoBoxes
- Rye::NoHost
- Rye::NoPassword
- Rye::NoPty
- Rye::NotConnected
- Rye::Rap
- Rye::RyeError
- Rye::Set
- Rye::Tpl
- Rye::VERSION
- Object

No matching classes.

# Rye::Tpl

### Attributes

basename[R]
result[R]
src[R]

### Public Class Methods

new(src, basename='rye-template') click to toggle source

    # File lib/rye.rb, line 287
    def initialize(src, basename='rye-template')
      @basename = basename
      src = src.to_s
      @src, @template = src, ERB.new(src)
    end

### Public Instance Methods

delete() click to toggle source

    # File lib/rye.rb, line 300
    def delete
      File.delete(@tf.path) if File.exists?(@tf.path)
    end

path() click to toggle source

    # File lib/rye.rb, line 292
    def path
      if @tf.nil?
        @tf = Tempfile.new basename
        @tf.write @result
        @tf.close
      end
      @tf.path
    end

result!(binding) click to toggle source

    # File lib/rye.rb, line 303
    def result!(binding)
      @result = result(binding)
    end

to_s() click to toggle source

    # File lib/rye.rb, line 309
    def to_s() src end

[Validate]

Generated with the Darkfish Rdoc Generator 2.