Sha256: f9be7e01832d6292db1ad516e7589ef2e33f354ddaacb2f8389fbb5682c288e9
Contents?: true
Size: 547 Bytes
Versions: 10
Compression:
Stored size: 547 Bytes
Contents
class Dorsale::ExpenseGun::Expense::Copy < ::Dorsale::Service attr_accessor :expense, :copy def initialize(expense) @expense = expense end def call @copy = expense.dup @copy.user = nil @copy.date = nil @copy.state = "new" @copy.created_at = nil @copy.updated_at = nil @expense.expense_lines.each do |line| line = line.dup line.date = nil line.created_at = nil line.updated_at = nil @copy.expense_lines << line end @copy end end
Version data entries
10 entries across 10 versions & 1 rubygems