Class: Template

at.pkgs. Template

テンプレートクラス. チュートリアル: at.pkgs.Template

new Template(source, engine, instance)

Parameters:
Name Type Argument Description
source String

テンプレートソース.

engine at.pkgs.TemplateEngine

テンプレートエンジン.

instance at.pkgs.Template <optional>

インスタンス.

Since:
  • 0.1.4
Source:

Extends

Members

code :String

テンプレート実行スクリプト.

Type:
  • String
Since:
  • 0.1.4
Source:

engine :at.pkgs.TemplateEngine

テンプレートエンジン.

Type:
Since:
  • 0.1.4
Source:

<readonly> parent :Object

親クラスのプロトタイプへの参照.

Type:
  • Object
Since:
  • 0.1.3
Inherited From:
Source:

<readonly> self :Function

コンストラクタへの参照.

Type:
  • Function
Since:
  • 0.1.0
Inherited From:
Source:

texts :String[]

テキストノードの配列.

Type:
  • String[]
Since:
  • 0.1.4
Source:

Methods

escape(source) → {String}

文字列をエスケープする.

Parameters:
Name Type Description
source *

エスケープ対象.

Since:
  • 0.1.4
Source:
Returns:

エスケープ済文字列.

Type
String

immediate() → {Boolean}

指定された名称のプロパティを直接持つか取得する.

Parameters:
Name Type Description
プロパティ名. String
Since:
  • 0.1.5
Inherited From:
Source:
Returns:

持つならばtrue.

Type
Boolean

prepare()

テンプレートソースを処理し、実行可能にする.

Parameters:
Name Type Description
テンプレートソース. String
Since:
  • 0.1.4
Source:

raw(source) → {String}

文字列化する.

Parameters:
Name Type Description
source *

対象.

Since:
  • 0.1.4
Source:
Returns:

文字列.

Type
String

render(_attributes_) → {String}

テンプレートを実行する.

Parameters:
Name Type Description
_attributes_ Object

テンプレートパラメタ.

Since:
  • 0.1.4
Source:
Returns:

出力文字列.

Type
String

text(index) → {String}

指定されたインデックスのテキストを取得する.

Parameters:
Name Type Description
index Number

テキストノードインデックス.

Since:
  • 0.1.4
Source:
Returns:

テキスト.

Type
String
Copyright (c) 2009-2014, Architector Inc., Japan.
Documentation generated by JSDoc 3.2.0 on Tue Aug 26 2014 22:27:18 GMT+0900 (JST) using the DocStrap template.