fast-html-template
- fast-html-template�Ȥ�
HTML��ƥ�ץ졼�ȤȤ��ư���Ruby�⥸�塼��Ǥ��� HTML/Template�򻲹ͤˤ��Ƥ���Τǡ� Ʊ���褦�ʻȤ������Ǥ�����ǽ���ĥ���Ƥ���ޤ��� ���֤Τ����äƤ��������֤��ν�����������û�̤��ޤ�����
- ���󥹥ȡ���
���󥹥ȡ�����ä�É�¿½×¤ï¿½ï¿½ï¿½Þ¤ï¿½ï¿½ï¿½ Ruby������ץȤ��ï¿�fast-html-template.rb��require���Ʋ�������
- �Ȥ���
�ƥ�ץ졼��Â�¿½Ç»ï¿½ï¿½Ñ¤Ç¤ï¿½ï¿½ë¥¿ï¿½ï¿� �ƥ����ξܤ����Ȥ����ϡ���°����ץ�ò»²¹Í¤Ë¤ï¿½ï¿½Æ¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½
<!var:PARAMETER_NAME>
HTML::Template#param({PARAMETER_NAME => VAL})��Ƥ֤ȡ�ñ���VAL���Ѵ�����ޤ���
<!include:FILE_PATH>
ñ���FILE_PATH�ǻ��ꤵ�줿�ե�������ִ�����ޤ���
<!if:PARAMETER_NAME>
<!ifend:PARAMETER_NAME>�Ϥޤ줿�ϰϤ�֥�å��Ȥ��ơ����Ê�¿½ï¿½ï¿½Ô¤ï¿½ï¿½Þ¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ò¤Ë¤ï¿½ï¿½ë¤³ï¿½È¤ï¿½ï¿½Ç½ï¿½Ç¤ï¿½ï¿½ï¿� �ͤ�nil�ʳ���¸�ߤ�����ˡ��Ϥޤ줿�ϰϤ�ɽ�����ޤ��ï¿�
<!loop:PARAMETER_NAME>
<!loopend:PARAMETER_NAME>�Ϥޤ줿�ϰϤ�֥�å��Ȥ��ơ������֤���Ԥ��ޤ�������Ҥˤ��뤳�Ȥ��ǽ�Ǥ��ï¿� HTML::Template#param�ǡ��б�����PARAMETER_NAME���ͤ�¸�ߤ��ʤ��� �㤷����nil�ξ�ç¡�¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ô¤ï¿½ï¿½Þ¤ï¿½ï¿½ó¡£¡ï¿½0�󷫤��֤��ޤ���
<!begin:PARAMETER_NAME>
<!end:PARAMETER_NAME>����Ȥθߴ����Τ�����Ѱդ��������Ǥ��� ���Υ�����<!if:><!loop:>ξ����Ư���򤹤뤳�Ȥ��Ǥ��ޤ���
<!unless:PARAMETER_NAME>
<!unlessend:PARAMETER_NAME>�Ϥޤ줿�ϰϤ�֥�å��Ȥ��ơ����Ê�¿½ï¿½ï¿½Ô¤ï¿½ï¿½Þ¤ï¿½ï¿½ï¿½ï¿½ï¿� <!if:>�����ȤϵդλȤ����ǡ��ͤ�nil�λ��ˡ��Ϥޤ줿�ϰϤ�ɽ�����ޤ���
���Υ���������Ҥˤ��뤳�ȤϤǤ��ޤ��������Υ���������Ҥˤ��뤳�ȤϤǤ��ޤ���<!preprocess:PROC_NAME>
���Υ�����<!var:>�����ȥ��åȤǻȤ��ޤ���
Ruby������ץ�Â�¿½Ç¡ï¿�HTML::Template#set_prep({PROC_NAME => proc})��Ƥӡï¿� <!var:val>��ľ�����֤����Ȥǡ�val��proc�ǽ���������̤��֤��ޤ��ï¿�<!proc:PROC_NAME>
<!var:PARAMETER_NAME>*����*
<!procend:PROC_NAME>���Υ����⡢<!var:>�����ȥ��åȤǻȤ��ޤ���
Ruby������ץ�Â�¿½Ç¡ï¿�HTML::Template#set_proc({PROC_NAME => proc})��Ƥӡï¿� <!var:val>�������Ϥ��ळ�Ȥˤ�äơ�ʣ��ΰ�������proc�����Ǥ��ޤ���
���������ʸ����Ȥ��ơ������ޤ��� ���ͤȤ��ƻȤ��������ϡ�ɬ�פ˱�����proc¦�Ƿ��Ѵ���ԤäƤ���������
�㡧
<!proc:aaa><!var:bbb>6,15,hello,!!!<!procend:aaa> - Ruby������ץ�Â�¿½Ç»ï¿½ï¿½Ñ¤Ç¤ï¿½ï¿½ï¿½á¥½ï¿½Ã¥ï¿½
HTML::Template#new( file = nil )
file�ˤϥƥ�ץ졼�ȤȤ��ƻ��Ѥ���ե�����Υѥ����Ϥ��ޤ���
�����Ϥ��ʤ����Ȥ�Ǥ��뤷��nil���Ϥ����Ȥ�Ǥ��ޤ���
file���Ȥˡ�������HTML::Template���֥������Ȥ��������ޤ���HTML::Template#set_html( html )
new�᥽�åɤ�nil���Ϥ�����ç¡�¿½ã¤·ï¿½ï¿½ï¿½Ï²ï¿½ï¿½ï¿½ï¿½Ï¤ï¿½ï¿½Ê¤ï¿½ï¿½Ã¤ï¿½ï¿½ï¿½ç¡¢ ʸ����html��ƥ�ץ졼�Ȥ��ƥ��åȤ��뤳�Ȥ��Ǥ��ޤ���
HTML::Template#param( hash = {} )
HTML::Template#expand( hash = {} )�ִ�����ʸ���󡢥롼�ס����Ê�¿½ï¿½ï¿½Ï¥Ã¥ï¿½ï¿½ï¿½Ç»ï¿½ï¿½ê¤·ï¿½Þ¤ï¿½ï¿½ï¿½
�������ꤹ��ȡ�������Ê�¿½Ï¥ë¡¼ï¿½×¤Ë¤Ê¤ï¿½Þ¤ï¿½ï¿½ï¿½HTML::Template#output
�ƥ�ץ졼�Ȥ����������̤��֤��ޤ���
ɬ���Ǹ�˸Ƥ�Ǥ���������HTML::Template#set_prep( hash = {} )
<!preprocess:PROC_NAME>�����ǻ��Ѥ���proc�򥻥åȤ��ޤ���
�ҤȤĤ������ꤹ�뤳�Ȥ��Ǥ��ޤ���
2��Ƥ����ç¡�¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ç¾ï¿½ñ¤¤ï¿½ï¿½ï¿½Þ¤ï¿½ï¿½ï¿�HTML::Template#def_prep( proc = nil )
���δؿ��Ƥ֤ȡ�<!preprocess:PROC_NAME>�������ʤ����ˤ� <!var:value>�����η�̤�proc�ǽ������ޤ���
��������<!preprocess:PROC_NAME>������������ϡ������é¤�¥ï¿½è¤µï¿½ï¿½Þ¤ï¿½ï¿½ï¿½HTML::Template#set_proc( hash = {} )
<!proc:PROC_NAME>�����ǻ��Ѥ���proc�򥻥åȤ��ޤ���
�����ʣ��ļ�ͳ������Ǥ��ޤ����� <!proc:PROC_NAME>�ȤΡ��Ŀ��Ʊ���ɬ�פ�����ޤ��� - ��°����ץ�ˤĤ���
��°����ץ�ϡ�Ruby������ץȤ�ư���Ķ��Ǥ�����������
�ޤ���fast-html-template.rb��Ʊ�ؤ��֤�ɬ�פ�����ޤ���iftest.rb, iftest.html
<!if:PARAMETER_NAME> �� <!unless:PARAMETER_NAME> �� ñ��ʥ���ץ�Ǥ���
ifnest.rb, ifnest.html
<!if> ������ͥ��Ȥ������Υ���ץ�Ǥ���
Ruby������ץ�Â�¿½Î¥ï¿½Ç¥ï¿½Ç¡ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Í¤ï¿½ï¿½Ñ¤ï¿½ï¿½Æ¤ß¤ï¿½È¤ï¤«ï¿½ï¿½×¤ï¿½ï¿½Ç¤ï¿½ï¿½ï¿�looptest.rb, looptest.html
<!loop> ������ñ��ʥ���ץ�Ǥ���
��������Ǥο���������֤��ޤ���
�ޤ�����Ⱦ��ʸ����ϡ����֤���ӤΤ���Τ�Τǡ� <!loop> �����Ȥϴط�����ޤ���preprocess.rb, preprocess.html
prenest.rb, prenest.html<!preprocess> ������ñ��ʥ���ץ�Ǥ���
set_prep, def_prep�᥽�åɤˤ���դ��Ƥ���������
��������ɽ�����뤳�Ȥǡ� <!preprocess> �����θ��̤��Τ뤳�Ȥ��Ǥ��ޤ���proc.rb, proc.html
<!proc> ������ñ��ʥ���ץ�Ǥ���
<!var:value> ����ܤ�ʸ����Ȥ�������ǽ������Ƥ��ޤ��� - fast-html-template ChangeLog
Version 0.1��������9/05 ���꡼��