Class: Docks::Languages::Sass
- Defined in:
- lib/docks/languages/sass_language.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Class Method Details
.extensions ⇒ Object
9 |
# File 'lib/docks/languages/sass_language.rb', line 9 def self.extensions; %w(scss sass) end |
.symbol_sources ⇒ Object
10 |
# File 'lib/docks/languages/sass_language.rb', line 10 def self.symbol_sources; SymbolSources::Sass end |
Instance Method Details
#parser ⇒ Object
26 |
# File 'lib/docks/languages/sass_language.rb', line 26 def parser; Docks::Parsers::Sass.instance end |
#signature_for(symbol) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/docks/languages/sass_language.rb', line 12 def signature_for(symbol) return unless [Types::Symbol::FUNCTION, Types::Symbol::MIXIN].include?(symbol.symbol_type) directive = "@#{symbol.symbol_type == Types::Symbol::FUNCTION ? "function" : "mixin"} #{symbol.name}" params = symbol.fetch(:params, []).map do |param| name, default = param.name, param.default param_string = variable_presentation(name) param_string << ": #{default}" if default param_string end "#{directive}(#{params.join(", ")}) { /* ... */ }" end |