Module: Secretariat::Versioner

Included in:
Invoice, LineItem
Defined in:
lib/secretariat/versioner.rb

Instance Method Summary collapse

Instance Method Details

#by_version(version, v1, v2) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/secretariat/versioner.rb', line 18

def by_version(version, v1, v2)
  if version == 1
    v1
  elsif version == 2
    v2
  else
    raise "Unsupported Version: #{version}"
  end
end