YARD CHEATSHEET http://yardoc.org
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
| class EventedClass | |
| bind: (event, callback) -> | |
| @eventHandlers ||= {} | |
| @eventHandlers[event] = [] unless @eventHandlers[event]? | |
| @eventHandlers[event].push(callback) | |
| return true | |
| unbind: (event, callback) -> | |
| @eventHandlers ||= {} |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
| /* =========================================================== | |
| * bootstrap-tooltip.js v2.2.2 | |
| * http://twitter.github.com/bootstrap/javascript.html#tooltips | |
| * Inspired by the original jQuery.tipsy by Jason Frame | |
| * =========================================================== | |
| * Copyright 2012 Twitter, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at |
| $(document).ready(function() { | |
| // Support for AJAX loaded modal window. | |
| // Focuses on first input textbox after it loads the window. | |
| $('[data-toggle="modal"]').click(function(e) { | |
| e.preventDefault(); | |
| var url = $(this).attr('href'); | |
| if (url.indexOf('#') == 0) { | |
| $(url).modal('open'); | |
| } else { |