[英]what's meaning of %@ … @ in ruby?
在themes.rb中 , %@ @
包含以下代码:
%@
$has_bg_image: #{theme.has_bg_image?};
$bg_color: ##{theme.bg_color};
$fg_color: ##{theme.fg_color};
$bg_image_url: '/_files/themes/bg_image/#{theme.group_id}/# {theme.id}/#{theme.version}.png';
$topbar_color: ##{theme.topbar_color};
$logo_url: '/_files/groups/logo/#{theme.group_id}/# {theme.version}.png';
$view_bg_color: ##{theme.view_bg_color};
$brand_color: ##{theme.brand_color};
$fluid: #{theme.fluid};
$bg_shadow: #999;
@
我可以找到有关语法的哪些参考? 我不知道如何在google
和SO
搜索像%@
这样的特殊字符,这很尴尬!
该语法将使用插值以及两个'@'字符之间的所有文本来创建字符串。 您可以在所需的'%'之后使用任何定界符,只要它与文本中的字符不冲突即可。 这是它的参考: http : //www.zenspider.com/Languages/Ruby/QuickRef.html#strings
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.