Class: PdfTemplator::MoneyType

Inherits:
NumericType show all
Defined in:
lib/pdf_templator/types.rb

Instance Attribute Summary

Attributes inherited from Type

#args, #content

Instance Method Summary collapse

Methods inherited from NumericType

#initialize

Methods inherited from Type

#initialize

Constructor Details

This class inherits a constructor from PdfTemplator::NumericType

Instance Method Details

#callObject



30
31
32
33
# File 'lib/pdf_templator/types.rb', line 30

def call
  formatted = content.to_s[0..-3].to_i.to_words
  "#{formatted} #{content.to_s[-2..-1]}/100"
end