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.
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.
module HasPolicy | |
extend ActiveSupport::Concerns | |
included do | |
delegate :default_policy, to: :'self.class', allow_nil: true, prefix: false | |
end | |
module ClassMethods | |
def has_policy(policy_name = nil) | |
@@policy_class = |
logins = %i{zabrovskiy lisichkin serkin sokorev romnychev minzhynkov mescheryakova shipiev svyatskaya bykovchenko} | |
logins.inject do |result, login| | |
user_id = User.where(login: login).first.id | |
issues = Issue.where(assigned_to_id: user_id, fixed_version_id: 2279). | |
spent_full = | |
issues.joins(:time_entries).where('time_entries.created_on >= DATE("2015-09-15")'). | |
pluck('SUM(time_entries.hours) AS sum_hours').first | |
est = issues.pluck('SUM(issues.estimated_hours) AS est_hours').first | |
coef = est.to_f/spent_full.to_f |
module VhodWorktypes::ProjectPatch | |
extend ActiveSupport::Concern | |
included do | |
remove_const(:IDENTIFIER_MAX_LENGTH) | |
end | |
module ClassMethods | |
def const_missing(sym) | |
if sym == :IDENTIFIER_MAX_LENGTH |
module Concerns | |
module PrintOrder | |
module GroupPageNumbers | |
def sequent_grouping(array) | |
begin_group, prev_value, result = nil, nil, [] | |
array.sort.each_with_index do |item, index| | |
if index.zero? | |
begin_group, prev_value = index, item | |
elsif prev_value.succ != item |
#Download Elementary OS from here: | |
#http://sourceforge.net/projects/elementaryos/files/stable/ | |
#First you update your system | |
sudo apt-get update && sudo apt-get dist-upgrade | |
#Install Google Chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' |