Sha256: ee1cce4e23a6f426a61df4dc86273880feb8ec0422b57458950069d6191b6c77

Contents?: true

Size: 1.53 KB

Versions: 63

Compression:

Stored size: 1.53 KB

Contents

// This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License.
Syntax.lib.rubyStyleFunction={pattern:/(?:def\s+|\.)([a-z_][a-z0-9_]+)/gi,matches:Syntax.extractMatches({klass:"function"})};Syntax.lib.rubyStyleSymbol={pattern:/([:]?):\w+/g,klass:"constant",matches:function(a,b){return""!=a[1]?[]:[new Syntax.Match(a.index,a[0].length,b,a[0])]}};
Syntax.register("ruby",function(a){a.push(["private","protected","public"],{klass:"access"});a.push(["self","super","true","false","nil"],{klass:"constant"});a.push({pattern:/(%[\S])(\{[\s\S]*?\})/g,matches:Syntax.extractMatches({klass:"function"},{klass:"constant"})});a.push({pattern:/`[^`]+`/g,klass:"string"});a.push({pattern:/#\{([^\}]*)\}/g,matches:Syntax.extractMatches({brush:"ruby",only:["string"]})});a.push(Syntax.lib.rubyStyleRegularExpression);a.push({pattern:/(@+|\$)[\w]+/g,klass:"variable"});
a.push(Syntax.lib.camelCaseType);a.push("alias and begin break case class def define_method defined? do else elsif end ensure false for if in module next not or raise redo rescue retry return then throw undef unless until when while yield block_given?".split(" "),{klass:"keyword"});a.push("+*/-&|~!%<=>".split(""),{klass:"operator"});a.push(Syntax.lib.rubyStyleSymbol);a.push(Syntax.lib.perlStyleComment);a.push(Syntax.lib.webLink);a.push(Syntax.lib.singleQuotedString);a.push(Syntax.lib.doubleQuotedString);
a.push(Syntax.lib.stringEscape);a.push(Syntax.lib.decimalNumber);a.push(Syntax.lib.hexNumber);a.push(Syntax.lib.rubyStyleFunction);a.push(Syntax.lib.cStyleFunction)});

Version data entries

63 entries across 63 versions & 2 rubygems

Version Path
utopia-project-0.20.0 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.19.1 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.19.0 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.18.1 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.18.0 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.17.4 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.17.3 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.17.2 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.17.1 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.17.0 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.16.0 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.15.5 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.15.4 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.15.3 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
async-debug-0.1.1 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
async-debug-0.1.0 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.15.2 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.15.1 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.15.0 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js
utopia-project-0.14.2 public/_components/jquery-syntax/jquery.syntax.brush.ruby.js