class Rouge::Lexers::Moonscript
Public Class Methods
detect?(text)
click to toggle source
# File lib/rouge/lexers/moonscript.rb, line 25 def self.detect?(text) return true if text.shebang? 'moon' end
new(*)
click to toggle source
Calls superclass method
# File lib/rouge/lexers/moonscript.rb, line 18 def initialize(*) super @function_highlighting = bool_option(:function_highlighting) { true } @disabled_modules = list_option(:disabled_modules) end
Public Instance Methods
builtins()
click to toggle source
# File lib/rouge/lexers/moonscript.rb, line 29 def builtins return [] unless @function_highlighting @builtins ||= Set.new.tap do |builtins| Rouge::Lexers::Lua.builtins.each do |mod, fns| next if @disabled_modules.include? mod builtins.merge(fns) end end end