haml ã¯æ§é åæç« ãã·ã³ãã«ãã¤å¼·åã«è¨è¿°ãããã¨ãã§ãããã è¤æ°è¡ã®ãã¼ã¿ã®æ±ãã«ã¯ä»¥ä¸ã®çç±ã§ä¸åãã§ããã è¡æåã§ããããé©åãªã¤ã³ãã³ãã®è¨è¿°ãå¼·è¦ããã é å¼µã£ã¦åãè¾¼ãã§ãå¯èªæ§ãè½ã¡ã¦å ¨ä½ã®æ§é ãææ¡ãè¾ããªã ãããæ¹åããã«ã¯ãã³ã¼ã(æ§é æ å ±)ã¨ãã¼ã¿ã®åé¢ãå¿ è¦ã«ãªãã inline filter module 1 module Inline 2 include Haml::Filters::Base 3 4 def self.[](key) 5 @@data[key.to_s] rescue nil 6 end 7 8 def render(str) 9 @@data = Hash[*str.split(/^\s*@@\s*(\w+)\s*\n/m)[1..-1]] 10 return nil 11 end 12 end
{{#tags}}- {{label}}
{{/tags}}