Module: SassC::Script
- Defined in:
- lib/sassc/script.rb,
lib/sassc/script/functions.rb,
lib/sassc/script/value_conversion/map.rb,
lib/sassc/script/value_conversion/base.rb,
lib/sassc/script/value_conversion/bool.rb,
lib/sassc/script/value_conversion/list.rb,
lib/sassc/script/value_conversion/color.rb,
lib/sassc/script/value_conversion/number.rb,
lib/sassc/script/value_conversion/string.rb
Defined Under Namespace
Modules: Functions, ValueConversion
Classes: Value
Class Method Summary
collapse
Class Method Details
.custom_functions(functions: Functions) ⇒ Object
6
7
8
|
# File 'lib/sassc/script.rb', line 6
def self.custom_functions(functions: Functions)
functions.public_instance_methods
end
|
10
11
12
13
14
|
# File 'lib/sassc/script.rb', line 10
def self.formatted_function_name(function_name, functions: Functions)
params = functions.instance_method(function_name).parameters
params = params.map { |param_type, name| "$#{name}#{': null' if param_type == :opt}" }.join(", ")
return "#{function_name}(#{params})"
end
|