Class: Sass::Script::Value::Function
Overview
A SassScript object representing a function.
Instance Attribute Summary
Attributes inherited from Base
#options, #source_range, #value
Instance Method Summary (collapse)
-
#initialize(function) ⇒ Function
constructor
Constructs a Function value for use in SassScript.
- #to_sass ⇒ Object
Methods inherited from Callable
Methods inherited from Base
#==, #assert_int!, #bracketed, #div, #eq, #eql?, #hash, #inspect, #minus, #neq, #null?, #plus, #separator, #single_eq, #to_a, #to_bool, #to_h, #to_i, #to_s, #unary_div, #unary_minus, #unary_not, #unary_plus, #with_contents
Constructor Details
#initialize(function) ⇒ Function
Constructs a Function value for use in SassScript.
function is invoked.
8 9 10 11 12 13 |
# File '.ruby-sass/lib/sass/script/value/function.rb', line 8 def initialize(function) unless function.type == "function" raise ArgumentError.new("A callable of type function was expected.") end super end |
Constructor Details
#initialize(function) ⇒ Function
Constructs a Function value for use in SassScript.
function is invoked.
8 9 10 11 12 13 |
# File '.ruby-sass/lib/sass/script/value/function.rb', line 8 def initialize(function) unless function.type == "function" raise ArgumentError.new("A callable of type function was expected.") end super end |
Instance Method Details
#to_sass ⇒ Object
15 16 17 |
# File '.ruby-sass/lib/sass/script/value/function.rb', line 15 def to_sass %{get-function("#{value.name}")} end |