This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActiveDebtReportWorker < BaseWorker | |
perform :report_repository do |object| | |
report_generator.generate object | |
end | |
protected | |
def report_repository | |
options[:report_repository] || ActiveDebtReport | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# models/active_debt.rb | |
class ActiveDebt < ActiveRecord::Base | |
delegate :fine, to: :calculator, prefix: :updated | |
def calculator | |
LatePaymentPenalty.new self | |
end | |
end | |
# Use: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |