Browse files

add some Rails things

  • Loading branch information...
1 parent 71969c2 commit 1abfd5f8134bd94a6c2e2623830ecbd47d36c40c Heigh Tech LLC committed with fjakobs Mar 16, 2011
Showing with 20 additions and 8 deletions.
  1. +20 −8 lib/ace/mode/ruby_highlight_rules.js
View
28 lib/ace/mode/ruby_highlight_rules.js
@@ -45,20 +45,32 @@ var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightR
var RubyHighlightRules = function() {
var builtinFunctions = lang.arrayToMap(
- ("abort|Array|at_exit|attr|attr_writer|attr_reader|attr_accessor|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|eval|exec|exit|exit!" +
- "fail|Float|fork|format|gem|gets|global_variables|gsub|gsub!|include|Integer|lambda|load|local_variables|loop|open|p|print|" +
- "printf|proc|putc|puts|raise|rand|readline|readlines|require|scan|select|set_trace_func|sleep|split|sprintf|srand|" +
- "String|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|" +
- "atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan").split("|")
+ ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
+ "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
+ "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
+ "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
+ "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
+ "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
+ "attr|attr_writer|attr_reader|attr_accessor|autoload|binding|block_given?|callcc|" +
+ "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
+ "exit!|fail|Float|flunk|follow_redirect!|fork|format|gets|global_variables|gsub|" +
+ "gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|" +
+ "link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
+ "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
+ "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
+ "set_trace_func|sleep|split|sprintf|srand|String|syscall|system|sub|sub!|test|" +
+ "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan").split("|")
);
var keywords = lang.arrayToMap(
- ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|" +
- "if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield").split("|")
+ ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
+ "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield").split("|")
);
var buildinConstants = lang.arrayToMap(
- ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING").split("|")
+ ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING").split("|")
);
var builtinVariables = lang.arrayToMap(

0 comments on commit 1abfd5f

Please sign in to comment.