Module: Trenni

Defined in:
lib/trenni/buffer.rb,
lib/trenni/markup.rb,
lib/trenni/builder.rb,
lib/trenni/strings.rb,
lib/trenni/version.rb,
lib/trenni/entities.rb,
lib/trenni/template.rb,
lib/trenni/parse_error.rb,
lib/trenni/substitutions.rb,
lib/trenni/parse_delegate.rb,
lib/trenni/fallback/markup.rb,
lib/trenni/fallback/template.rb,
ext/trenni/trenni.c

Overview

Copyright, 2012, by Samuel G. D. Williams. <www.codeotaku.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Defined Under Namespace

Modules: Entities, Fallback, Markup, Native, Script, Strings Classes: Buffer, Builder, FileBuffer, IOBuffer, Location, MarkupString, MarkupTemplate, ParseDelegate, ParseError, Substitutions, Template

Constant Summary collapse

INSTRUCT_ATTRIBUTES =
[
  ['version', '1.0'],
  ['encoding', 'UTF-8']
].freeze
Parsers =
Trenni::Fallback
VERSION =
"2.0.2"
OUT =

The output variable that will be used in templates:

:_out

Class Method Summary collapse

Class Method Details

.Buffer(value) ⇒ Object



80
81
82
83
84
85
86
87
88
89
# File 'lib/trenni/buffer.rb', line 80

def self.Buffer(value)
  case value
  when String
    Buffer.new(value)
  when Buffer, FileBuffer, IOBuffer
    value
  else
    value.to_buffer
  end
end

.MarkupString(value) ⇒ Object



73
74
75
# File 'lib/trenni/markup.rb', line 73

def self.MarkupString(value)
  Markup.escape(value)
end