Class: N::NilShader

Inherits:
Shader show all
Defined in:
lib/n/shaders.rb

Overview

NilShader

A shader that does absolutely nothing.

WARNING: not tested.

Instance Attribute Summary

Attributes inherited from Shader

#mtime, #name, #xsl_filename, #xslt

Instance Method Summary collapse

Methods inherited from Shader

#to_s, #xsl, #xsl_transform

Constructor Details

#initializeNilShader

Returns a new instance of NilShader.



107
108
109
110
# File 'lib/n/shaders.rb', line 107

def initialize
	@name = "nil"
	@mtime = Time.at(0)
end

Instance Method Details

#transform(document) ⇒ Object

No transform, just convert to a String.



113
114
115
# File 'lib/n/shaders.rb', line 113

def transform(document)
	return document.to_s
end