Skip to content

Instantly share code, notes, and snippets.

View robsonmarques's full-sized avatar
🦊
Working on the next big thing

Robson Marques robsonmarques

🦊
Working on the next big thing
View GitHub Profile
@robsonmarques
robsonmarques / active_debt_report_worker.rb
Last active December 25, 2015 02:58
Worker Notes - mhl_sidekiq_concern
class ActiveDebtReportWorker < BaseWorker
perform :report_repository do |object|
report_generator.generate object
end
protected
def report_repository
options[:report_repository] || ActiveDebtReport
end
@robsonmarques
robsonmarques / gist:6815504
Last active December 24, 2015 14:49
Calculator
# models/active_debt.rb
class ActiveDebt < ActiveRecord::Base
delegate :fine, to: :calculator, prefix: :updated
def calculator
LatePaymentPenalty.new self
end
end
# Use:
@robsonmarques
robsonmarques / .vimrc
Last active December 19, 2015 11:29
.vimrc
set nocompatible " Must come first because it changes other options.
" Manage the runtime path with Pathogen.
silent! call pathogen#runtime_append_all_bundles()
silent! call pathogen#helptags()
syntax enable " Turn on syntax highlighting.
filetype plugin indent on " Turn on file type detection.
set cc=80