class Docks::Languages::Less
Public Class Methods
extensions()
click to toggle source
# File lib/docks/languages/less_language.rb, line 8 def self.extensions; %w(less) end
type()
click to toggle source
# File lib/docks/languages/less_language.rb, line 7 def self.type; Docks::Types::Languages::STYLE end
Public Instance Methods
parser()
click to toggle source
# File lib/docks/languages/less_language.rb, line 24 def parser; Docks::Parsers::Less.instance end
signature_for(symbol)
click to toggle source
# File lib/docks/languages/less_language.rb, line 10 def signature_for(symbol) return unless symbol.kind_of?(Containers::Mixin) directive = clean_presentation(symbol.name, ".") params = symbol.fetch(:param, []).map do |param| name, default = param.name, param.default param_string = clean_presentation(name) param_string << ": #{default}" if default param_string end "#{directive}(#{params.join(", ")}) { /* ... */ }" end
Protected Instance Methods
clean_presentation(symbol, prefix = "@")
click to toggle source
# File lib/docks/languages/less_language.rb, line 28 def clean_presentation(symbol, prefix = "@") "#{prefix unless symbol.start_with?(prefix)}#{symbol}" end