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.
| ````git | |
| git config --global // username, email, other | |
| git config --global push.default current | |
| ```` | |
| ````javascript | |
| { | |
| "auto_complete": true, |
| # code in my rails engine | |
| moduel MyEngine | |
| class SomeController | |
| extend ActiveSupport::Concern | |
| def engine_some_method | |
| end | |
| end | |
| end |
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 Post < ActiveRecord::Base | |
| has_many :comments, as: commentable | |
| # attributes, :title | |
| end | |
| class Comment < ActiveRecord::Base | |
| belongs_to :commentable, polymorphic: true | |
| end |
| require 'open-uri' | |
| require 'nokogiri' | |
| class Fetcher | |
| attr_accessor :url, :content_path, :page, :counter | |
| def initialize | |
| @counter = 0 | |
| @page = 0 |
| require File.expand_path('../boot', __FILE__) | |
| require 'rails/all' | |
| if defined?(Bundler) | |
| # If you precompile assets before deploying to production, use this line | |
| Bundler.require(*Rails.groups(:assets => %w(development test))) | |
| # If you want your assets lazily compiled in production, use this line | |
| # Bundler.require(:default, :assets, Rails.env) | |
| end |
| ```yml | |
| developmet: | |
| host: | |
| username: | |
| password: | |
| ``` |
| topic = { | |
| "name": "Evil and Suffering", | |
| "bridge": { "content": "God never intended for life to be filled with pain." }, | |
| "questions": { "question": { "content": "As a parent, how would you care for children?"}, | |
| "question": { "content": "When have you had painful experiences?" } | |
| }, | |
| "barriers": { "barrier" : { "order": "0", "content": "Lost someone very close to them" }, |
| load 'deploy/assets' | |
| set :stages, %w(production staging) | |
| set :default_stage, 'staging' | |
| require 'capistrano/ext/multistage' | |
| require 'capistrano-unicorn' | |
| require 'bundler/capistrano' | |
| require 'rvm/capistrano' |
| // | |
| // Environment.h | |
| // Visible | |
| // | |
| // Created by weston on 9/4/13. | |
| // Copyright (c) 2013 Visible. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |