Skip to content

Instantly share code, notes, and snippets.

@tal
Created March 23, 2010 04:08
Show Gist options
  • Select an option

  • Save tal/340831 to your computer and use it in GitHub Desktop.

Select an option

Save tal/340831 to your computer and use it in GitHub Desktop.
My sequel model language file
{ scopeName = 'source.ruby.sequel.basic';
fileTypes = ( 'rb' );
patterns = (
{ name = 'meta.function.method.with-arguments.ruby.sequel';
begin = '^\s*(def_dataset_method)\s*';
end = '$';
beginCaptures = {
1 = { name = 'keyword.control.def.ruby';};
};
patterns = ( { include = 'source.ruby'; } );
},
{ include = 'source.ruby'; }
);
}
class MyModel < Sequel::Model
def_dataset_method :last do
order(:id.desc).first
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment