mirror of
https://github.com/danog/sass-site.git
synced 2025-01-09 14:38:39 +01:00
1287 lines
45 KiB
HTML
1287 lines
45 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<title>
|
||
Class: Sass::Script::Value::String
|
||
|
||
— Documentation by YARD 0.9.12
|
||
|
||
</title>
|
||
|
||
<link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
|
||
|
||
<link rel="stylesheet" href="../../../../assets/css/docs.css" type="text/css" charset="utf-8" />
|
||
|
||
<script type="text/javascript" charset="utf-8">
|
||
hasFrames = window.top.frames.main ? true : false;
|
||
relpath = '../../../';
|
||
framesUrl = "../../../frames.html#!Sass/Script/Value/String.html";
|
||
</script>
|
||
|
||
|
||
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
||
|
||
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
||
|
||
|
||
</head>
|
||
<body>
|
||
<div id="header">
|
||
<div id="menu">
|
||
|
||
<a href="../../../_index.html">Index (S)</a> »
|
||
<span class='title'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span> » <span class='title'><span class='object_link'><a href="../../Script.html" title="Sass::Script (module)">Script</a></span></span> » <span class='title'><span class='object_link'><a href="../Value.html" title="Sass::Script::Value (module)">Value</a></span></span>
|
||
»
|
||
<span class="title">String</span>
|
||
|
||
|
||
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
||
</div>
|
||
|
||
<div id="search">
|
||
|
||
<a class="full_list_link" id="class_list_link"
|
||
href="../../../class_list.html">
|
||
Class List
|
||
</a>
|
||
|
||
<a class="full_list_link" id="method_list_link"
|
||
href="../../../method_list.html">
|
||
Method List
|
||
</a>
|
||
|
||
<a class="full_list_link" id="file_list_link"
|
||
href="../../../file_list.html">
|
||
File List
|
||
</a>
|
||
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<iframe id="search_frame"></iframe>
|
||
|
||
<div id="content"><h1>Class: Sass::Script::Value::String
|
||
|
||
|
||
|
||
</h1>
|
||
|
||
<dl class="box">
|
||
|
||
<dt class="r1">Inherits:</dt>
|
||
<dd class="r1">
|
||
<span class="inheritName"><span class='object_link'><a href="Base.html" title="Sass::Script::Value::Base (class)">Base</a></span></span>
|
||
|
||
<ul class="fullTree">
|
||
<li>Object</li>
|
||
|
||
<li class="next"><span class='object_link'><a href="Base.html" title="Sass::Script::Value::Base (class)">Base</a></span></li>
|
||
|
||
<li class="next">Sass::Script::Value::String</li>
|
||
|
||
</ul>
|
||
<a href="#" class="inheritanceTree">show all</a>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt class="r2 last">Defined in:</dt>
|
||
<dd class="r2 last">.ruby-sass/lib/sass/script/value/string.rb</dd>
|
||
|
||
</dl>
|
||
<div class="clear"></div>
|
||
|
||
<h2>Overview</h2><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
<p>A SassScript object representing a CSS string <strong>or</strong> a CSS
|
||
identifier.</p>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
|
||
|
||
</div>
|
||
<h2>Constant Summary</h2>
|
||
|
||
<dl class="constants">
|
||
|
||
<dt id="interpolation_deprecation-classvariable" class="">@@interpolation_deprecation =
|
||
|
||
</dt>
|
||
<dd><pre class="code"><span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Deprecation.html" title="Sass::Deprecation (class)">Deprecation</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../Deprecation.html#initialize-instance_method" title="Sass::Deprecation#initialize (method)">new</a></span></span></pre></dd>
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
|
||
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
||
<ul class="summary">
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> ⇒ Symbol </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
<span class="note title readonly">readonly</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'>
|
||
<p>Whether this is a CSS string or a CSS identifier.</p>
|
||
</div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#value-instance_method" title="#value (instance method)">#<strong>value</strong> ⇒ String </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
<span class="note title readonly">readonly</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'>
|
||
<p>The Ruby value of the string.</p>
|
||
</div></span>
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="Sass::Script::Value::Base (class)">Base</a></span></h3>
|
||
<p class="inherited"><span class='object_link'><a href="Base.html#options-instance_method" title="Sass::Script::Value::Base#options (method)">#options</a></span>, <span class='object_link'><a href="Base.html#source_range-instance_method" title="Sass::Script::Value::Base#source_range (method)">#source_range</a></span></p>
|
||
|
||
|
||
|
||
<h2>
|
||
Class Method Summary
|
||
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
||
</h2>
|
||
|
||
<ul class="summary">
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#quote-class_method" title="quote (class method)">.<strong>quote</strong>(contents, opts = {}) ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'>
|
||
<p>Returns the quoted string representation of `contents`.</p>
|
||
</div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#value-class_method" title="value (class method)">.<strong>value</strong>(contents) ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
<h2>
|
||
Instance Method Summary
|
||
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
||
</h2>
|
||
|
||
<ul class="summary">
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#check_deprecated_interp-instance_method" title="#check_deprecated_interp (instance method)">#<strong>check_deprecated_interp</strong> ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'>
|
||
<p>Prints a warning if this string was created using potentially-deprecated
|
||
interpolation.</p>
|
||
</div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(value, type = :identifier, deprecated_interp_equivalent = nil) ⇒ String </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
<span class="note title constructor">constructor</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'>
|
||
<p>Creates a new string.</p>
|
||
</div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#inspect-instance_method" title="#inspect (instance method)">#<strong>inspect</strong> ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#plus-instance_method" title="#plus (instance method)">#<strong>plus</strong>(other) ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#separator-instance_method" title="#separator (instance method)">#<strong>separator</strong> ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#to_a-instance_method" title="#to_a (instance method)">#<strong>to_a</strong> ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong>(opts = {}) ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
||
</li>
|
||
|
||
|
||
<li class="public ">
|
||
<span class="summary_signature">
|
||
|
||
<a href="#to_sass-instance_method" title="#to_sass (instance method)">#<strong>to_sass</strong>(opts = {}) ⇒ Object </a>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Sass::Script::Value::Base (class)">Base</a></span></h3>
|
||
<p class="inherited"><span class='object_link'><a href="Base.html#==-instance_method" title="Sass::Script::Value::Base#== (method)">#==</a></span>, <span class='object_link'><a href="Base.html#assert_int!-instance_method" title="Sass::Script::Value::Base#assert_int! (method)">#assert_int!</a></span>, <span class='object_link'><a href="Base.html#bracketed-instance_method" title="Sass::Script::Value::Base#bracketed (method)">#bracketed</a></span>, <span class='object_link'><a href="Base.html#div-instance_method" title="Sass::Script::Value::Base#div (method)">#div</a></span>, <span class='object_link'><a href="Base.html#eq-instance_method" title="Sass::Script::Value::Base#eq (method)">#eq</a></span>, <span class='object_link'><a href="Base.html#eql%3F-instance_method" title="Sass::Script::Value::Base#eql? (method)">#eql?</a></span>, <span class='object_link'><a href="Base.html#hash-instance_method" title="Sass::Script::Value::Base#hash (method)">#hash</a></span>, <span class='object_link'><a href="Base.html#minus-instance_method" title="Sass::Script::Value::Base#minus (method)">#minus</a></span>, <span class='object_link'><a href="Base.html#neq-instance_method" title="Sass::Script::Value::Base#neq (method)">#neq</a></span>, <span class='object_link'><a href="Base.html#null%3F-instance_method" title="Sass::Script::Value::Base#null? (method)">#null?</a></span>, <span class='object_link'><a href="Base.html#single_eq-instance_method" title="Sass::Script::Value::Base#single_eq (method)">#single_eq</a></span>, <span class='object_link'><a href="Base.html#to_bool-instance_method" title="Sass::Script::Value::Base#to_bool (method)">#to_bool</a></span>, <span class='object_link'><a href="Base.html#to_h-instance_method" title="Sass::Script::Value::Base#to_h (method)">#to_h</a></span>, <span class='object_link'><a href="Base.html#to_i-instance_method" title="Sass::Script::Value::Base#to_i (method)">#to_i</a></span>, <span class='object_link'><a href="Base.html#unary_div-instance_method" title="Sass::Script::Value::Base#unary_div (method)">#unary_div</a></span>, <span class='object_link'><a href="Base.html#unary_minus-instance_method" title="Sass::Script::Value::Base#unary_minus (method)">#unary_minus</a></span>, <span class='object_link'><a href="Base.html#unary_not-instance_method" title="Sass::Script::Value::Base#unary_not (method)">#unary_not</a></span>, <span class='object_link'><a href="Base.html#unary_plus-instance_method" title="Sass::Script::Value::Base#unary_plus (method)">#unary_plus</a></span>, <span class='object_link'><a href="Base.html#with_contents-instance_method" title="Sass::Script::Value::Base#with_contents (method)">#with_contents</a></span></p>
|
||
<div id="constructor_details" class="method_details_list">
|
||
<h2>Constructor Details</h2>
|
||
|
||
<div class="method_details first">
|
||
<h3 class="signature first" id="initialize-instance_method">
|
||
|
||
#<strong>initialize</strong>(value, type = :identifier, deprecated_interp_equivalent = nil) ⇒ <tt><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
<p>Creates a new string.</p>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
<p class="tag_title">Parameters:</p>
|
||
<ul class="param">
|
||
|
||
<li>
|
||
|
||
<span class='name'>value</span>
|
||
|
||
|
||
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></tt>)</span>
|
||
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>See <span class='object_link'><a href="#value-instance_method" title="Sass::Script::Value::String#value (method)">#value</a></span></p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>type</span>
|
||
|
||
|
||
<span class='type'>(<tt>Symbol</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>:identifier</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>See <span class='object_link'><a href="#type-instance_method" title="Sass::Script::Value::String#type (method)">#type</a></span></p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>deprecated_interp_equivalent</span>
|
||
|
||
|
||
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span>?</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>If this was created via a potentially-deprecated string interpolation, this
|
||
is the replacement expression that should be suggested to the user.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
84
|
||
85
|
||
86
|
||
87
|
||
88</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 84</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='symbol'>:identifier</span><span class='comma'>,</span> <span class='id identifier rubyid_deprecated_interp_equivalent'>deprecated_interp_equivalent</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
||
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
||
<span class='ivar'>@type</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span>
|
||
<span class='ivar'>@deprecated_interp_equivalent</span> <span class='op'>=</span> <span class='id identifier rubyid_deprecated_interp_equivalent'>deprecated_interp_equivalent</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="constructor_details" class="method_details_list">
|
||
<h2>Constructor Details</h2>
|
||
|
||
<div class="method_details first">
|
||
<h3 class="signature first" id="initialize-instance_method">
|
||
|
||
#<strong>initialize</strong>(value, type = :identifier, deprecated_interp_equivalent = nil) ⇒ <tt><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
<p>Creates a new string.</p>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
<p class="tag_title">Parameters:</p>
|
||
<ul class="param">
|
||
|
||
<li>
|
||
|
||
<span class='name'>value</span>
|
||
|
||
|
||
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></tt>)</span>
|
||
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>See <span class='object_link'><a href="#value-instance_method" title="Sass::Script::Value::String#value (method)">#value</a></span></p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>type</span>
|
||
|
||
|
||
<span class='type'>(<tt>Symbol</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>:identifier</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>See <span class='object_link'><a href="#type-instance_method" title="Sass::Script::Value::String#type (method)">#type</a></span></p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>deprecated_interp_equivalent</span>
|
||
|
||
|
||
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span>?</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>If this was created via a potentially-deprecated string interpolation, this
|
||
is the replacement expression that should be suggested to the user.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
84
|
||
85
|
||
86
|
||
87
|
||
88</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 84</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='symbol'>:identifier</span><span class='comma'>,</span> <span class='id identifier rubyid_deprecated_interp_equivalent'>deprecated_interp_equivalent</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
||
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
||
<span class='ivar'>@type</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span>
|
||
<span class='ivar'>@deprecated_interp_equivalent</span> <span class='op'>=</span> <span class='id identifier rubyid_deprecated_interp_equivalent'>deprecated_interp_equivalent</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div id="instance_attr_details" class="attr_details">
|
||
<h2>Instance Attribute Details</h2>
|
||
|
||
|
||
<span id=""></span>
|
||
<div class="method_details first">
|
||
<h3 class="signature first" id="type-instance_method">
|
||
|
||
#<strong>type</strong> ⇒ <tt>Symbol</tt> <span class="extras">(readonly)</span>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
<p>Whether this is a CSS string or a CSS identifier. The difference is that
|
||
strings are written with double-quotes, while identifiers aren't.</p>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
|
||
<p class="tag_title">Returns:</p>
|
||
<ul class="return">
|
||
|
||
<li>
|
||
|
||
|
||
<span class='type'>(<tt>Symbol</tt>)</span>
|
||
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>`:string` or `:identifier`</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
17
|
||
18
|
||
19</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 17</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
|
||
<span class='ivar'>@type</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
|
||
<span id=""></span>
|
||
<div class="method_details ">
|
||
<h3 class="signature " id="value-instance_method">
|
||
|
||
#<strong>value</strong> ⇒ <tt><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></tt> <span class="extras">(readonly)</span>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
<p>The Ruby value of the string.</p>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
|
||
<p class="tag_title">Returns:</p>
|
||
<ul class="return">
|
||
|
||
<li>
|
||
|
||
|
||
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></tt>)</span>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
10
|
||
11
|
||
12</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 10</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
|
||
<span class='ivar'>@value</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div id="class_method_details" class="method_details_list">
|
||
<h2>Class Method Details</h2>
|
||
|
||
|
||
<div class="method_details first">
|
||
<h3 class="signature first" id="quote-class_method">
|
||
|
||
.<strong>quote</strong>(contents, opts = {}) ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
<p>Returns the quoted string representation of `contents`.</p>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
40
|
||
41
|
||
42
|
||
43
|
||
44
|
||
45
|
||
46
|
||
47
|
||
48
|
||
49
|
||
50
|
||
51
|
||
52
|
||
53
|
||
54
|
||
55
|
||
56
|
||
57
|
||
58
|
||
59
|
||
60
|
||
61
|
||
62
|
||
63
|
||
64
|
||
65
|
||
66
|
||
67
|
||
68
|
||
69
|
||
70
|
||
71
|
||
72
|
||
73
|
||
74
|
||
75</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 40</span>
|
||
|
||
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_quote'>quote</span><span class='lparen'>(</span><span class='id identifier rubyid_contents'>contents</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
||
<span class='id identifier rubyid_quote'>quote</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:quote</span><span class='rbracket'>]</span>
|
||
|
||
<span class='comment'># Short-circuit if there are no characters that need quoting.
|
||
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_contents'>contents</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[\n\\"']|\#\{</span><span class='regexp_end'>/</span></span>
|
||
<span class='id identifier rubyid_quote'>quote</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>"</span><span class='tstring_end'>'</span></span>
|
||
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_quote'>quote</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contents'>contents</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_quote'>quote</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
||
<span class='kw'>end</span>
|
||
|
||
<span class='kw'>if</span> <span class='id identifier rubyid_quote'>quote</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
||
<span class='kw'>if</span> <span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>"</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||
<span class='kw'>if</span> <span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
<span class='id identifier rubyid_quote'>quote</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>"</span><span class='tstring_end'>'</span></span>
|
||
<span class='kw'>else</span>
|
||
<span class='id identifier rubyid_quote'>quote</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span>
|
||
<span class='kw'>end</span>
|
||
<span class='kw'>else</span>
|
||
<span class='id identifier rubyid_quote'>quote</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>"</span><span class='tstring_end'>'</span></span>
|
||
<span class='kw'>end</span>
|
||
<span class='kw'>end</span>
|
||
|
||
<span class='comment'># Replace single backslashes with multiples.
|
||
</span> <span class='id identifier rubyid_contents'>contents</span> <span class='op'>=</span> <span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\\\\\\\</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
|
||
<span class='comment'># Escape interpolation.
|
||
</span> <span class='id identifier rubyid_contents'>contents</span> <span class='op'>=</span> <span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>#{</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\\#{</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:sass</span><span class='rbracket'>]</span>
|
||
|
||
<span class='kw'>if</span> <span class='id identifier rubyid_quote'>quote</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>"</span><span class='tstring_end'>'</span></span>
|
||
<span class='id identifier rubyid_contents'>contents</span> <span class='op'>=</span> <span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>"</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\\"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
<span class='kw'>else</span>
|
||
<span class='id identifier rubyid_contents'>contents</span> <span class='op'>=</span> <span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\'</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
<span class='kw'>end</span>
|
||
|
||
<span class='id identifier rubyid_contents'>contents</span> <span class='op'>=</span> <span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\n(?![a-fA-F0-9\s])</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\a</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\a </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_quote'>quote</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contents'>contents</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_quote'>quote</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="method_details ">
|
||
<h3 class="signature " id="value-class_method">
|
||
|
||
.<strong>value</strong>(contents) ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
19
|
||
20
|
||
21
|
||
22
|
||
23
|
||
24
|
||
25
|
||
26
|
||
27
|
||
28
|
||
29
|
||
30
|
||
31</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 19</span>
|
||
|
||
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_contents'>contents</span><span class='rparen'>)</span>
|
||
<span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\\(?:([0-9a-fA-F]{1,6})\s?|(.))</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
|
||
<span class='kw'>next</span> <span class='backref'>$2</span> <span class='kw'>if</span> <span class='backref'>$2</span>
|
||
<span class='comment'># Handle unicode escapes as per CSS Syntax Level 3 section 4.3.8.
|
||
</span> <span class='id identifier rubyid_code_point'>code_point</span> <span class='op'>=</span> <span class='backref'>$1</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span>
|
||
<span class='kw'>if</span> <span class='id identifier rubyid_code_point'>code_point</span> <span class='op'>==</span> <span class='int'>0</span> <span class='op'>||</span> <span class='id identifier rubyid_code_point'>code_point</span> <span class='op'>></span> <span class='int'>0x10FFFF</span> <span class='op'>||</span>
|
||
<span class='lparen'>(</span><span class='id identifier rubyid_code_point'>code_point</span> <span class='op'>>=</span> <span class='int'>0xD800</span> <span class='op'>&&</span> <span class='id identifier rubyid_code_point'>code_point</span> <span class='op'><=</span> <span class='int'>0xDFFF</span><span class='rparen'>)</span>
|
||
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><EFBFBD></span><span class='tstring_end'>'</span></span>
|
||
<span class='kw'>else</span>
|
||
<span class='lbracket'>[</span><span class='id identifier rubyid_code_point'>code_point</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_pack'>pack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>U</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
<span class='kw'>end</span>
|
||
<span class='kw'>end</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div id="instance_method_details" class="method_details_list">
|
||
<h2>Instance Method Details</h2>
|
||
|
||
|
||
<div class="method_details first">
|
||
<h3 class="signature first" id="check_deprecated_interp-instance_method">
|
||
|
||
#<strong>check_deprecated_interp</strong> ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
<p>Prints a warning if this string was created using potentially-deprecated
|
||
interpolation.</p>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
123
|
||
124
|
||
125
|
||
126
|
||
127
|
||
128
|
||
129
|
||
130
|
||
131
|
||
132</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 123</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_check_deprecated_interp'>check_deprecated_interp</span>
|
||
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@deprecated_interp_equivalent</span>
|
||
|
||
<span class='cvar'>@@interpolation_deprecation</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_source_range'>source_range</span><span class='period'>.</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_source_range'>source_range</span><span class='period'>.</span><span class='id identifier rubyid_start_pos'>start_pos</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='heredoc_beg'><<WARNING</span><span class='rparen'>)</span>
|
||
<span class='tstring_content'>\#{} interpolation near operators will be simplified in a future version of Sass.
|
||
To preserve the current behavior, use quotes:
|
||
|
||
</span><span class='embexpr_beg'>#{</span><span class='ivar'>@deprecated_interp_equivalent</span><span class='embexpr_end'>}</span><span class='tstring_content'>
|
||
</span><span class='heredoc_end'>WARNING
|
||
</span><span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="method_details ">
|
||
<h3 class="signature " id="inspect-instance_method">
|
||
|
||
#<strong>inspect</strong> ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
134
|
||
135
|
||
136</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 134</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
|
||
<span class='const'><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></span><span class='period'>.</span><span class='id identifier rubyid_quote'><span class='object_link'><a href="#quote-class_method" title="Sass::Script::Value::String.quote (method)">quote</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="method_details ">
|
||
<h3 class="signature " id="plus-instance_method">
|
||
|
||
#<strong>plus</strong>(other) ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
|
||
|
||
<p class="tag_title">See Also:</p>
|
||
<ul class="see">
|
||
|
||
<li>Value#plus</li>
|
||
|
||
</ul>
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
91
|
||
92
|
||
93
|
||
94
|
||
95
|
||
96
|
||
97
|
||
98</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 91</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_plus'>plus</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
||
<span class='id identifier rubyid_other_value'>other_value</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></span><span class='rparen'>)</span>
|
||
<span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
||
<span class='kw'>else</span>
|
||
<span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='symbol'>:quote</span> <span class='op'>=></span> <span class='symbol'>:none</span><span class='rparen'>)</span>
|
||
<span class='kw'>end</span>
|
||
<span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Script::Value::String#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span> <span class='op'>+</span> <span class='id identifier rubyid_other_value'>other_value</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="method_details ">
|
||
<h3 class="signature " id="separator-instance_method">
|
||
|
||
#<strong>separator</strong> ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
111
|
||
112
|
||
113
|
||
114</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 111</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_separator'>separator</span>
|
||
<span class='id identifier rubyid_check_deprecated_interp'>check_deprecated_interp</span>
|
||
<span class='kw'>super</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="method_details ">
|
||
<h3 class="signature " id="to_a-instance_method">
|
||
|
||
#<strong>to_a</strong> ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
116
|
||
117
|
||
118
|
||
119</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 116</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_to_a'>to_a</span>
|
||
<span class='id identifier rubyid_check_deprecated_interp'>check_deprecated_interp</span>
|
||
<span class='kw'>super</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="method_details ">
|
||
<h3 class="signature " id="to_s-instance_method">
|
||
|
||
#<strong>to_s</strong>(opts = {}) ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
|
||
|
||
<p class="tag_title">See Also:</p>
|
||
<ul class="see">
|
||
|
||
<li>Value#to_s</li>
|
||
|
||
</ul>
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
101
|
||
102
|
||
103
|
||
104</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 101</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
||
<span class='kw'>return</span> <span class='ivar'>@value</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\n\s*</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:quote</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:none</span> <span class='op'>||</span> <span class='ivar'>@type</span> <span class='op'>==</span> <span class='symbol'>:identifier</span>
|
||
<span class='const'><span class='object_link'><a href="" title="Sass::Script::Value::String (class)">String</a></span></span><span class='period'>.</span><span class='id identifier rubyid_quote'><span class='object_link'><a href="#quote-class_method" title="Sass::Script::Value::String.quote (method)">quote</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="method_details ">
|
||
<h3 class="signature " id="to_sass-instance_method">
|
||
|
||
#<strong>to_sass</strong>(opts = {}) ⇒ <tt>Object</tt>
|
||
|
||
|
||
|
||
|
||
|
||
</h3><div class="docstring">
|
||
<div class="discussion">
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="tags">
|
||
|
||
|
||
<p class="tag_title">See Also:</p>
|
||
<ul class="see">
|
||
|
||
<li>Value#to_sass</li>
|
||
|
||
</ul>
|
||
|
||
</div><table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
107
|
||
108
|
||
109</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/value/string.rb', line 107</span>
|
||
|
||
<span class='kw'>def</span> <span class='id identifier rubyid_to_sass'>to_sass</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
||
<span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='symbol'>:sass</span> <span class='op'>=></span> <span class='kw'>true</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
||
<span class='kw'>end</span></pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div id="footer">
|
||
Generated on Mon Oct 22 13:20:55 2018 by
|
||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||
0.9.12 (ruby-2.5.3).
|
||
</div>
|
||
<script>
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||
|
||
ga('create', 'UA-535380-14', 'sass-lang.com');
|
||
ga('send', 'pageview');
|
||
</script>
|
||
|
||
</body>
|
||
</html> |