Class: Abrasf::Desif::TaxCodeDecorator
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Abrasf::Desif::TaxCodeDecorator
- Defined in:
- app/decorators/abrasf/desif/tax_code_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.wrap(collection) ⇒ Object
6 7 8 |
# File 'app/decorators/abrasf/desif/tax_code_decorator.rb', line 6 def self.wrap(collection) collection.map { |obj| new obj } end |
Instance Method Details
#id ⇒ Object
14 15 16 |
# File 'app/decorators/abrasf/desif/tax_code_decorator.rb', line 14 def id format '%09d', super end |
#id_mask ⇒ Object
18 19 20 |
# File 'app/decorators/abrasf/desif/tax_code_decorator.rb', line 18 def id_mask "#{id[0..1]}.#{id[2..3]}.#{id[4..6]}-#{id[7..8]}" end |
#service_item_id ⇒ Object
10 11 12 |
# File 'app/decorators/abrasf/desif/tax_code_decorator.rb', line 10 def service_item_id format '%04d', super end |
#to_csv ⇒ Object
22 23 24 |
# File 'app/decorators/abrasf/desif/tax_code_decorator.rb', line 22 def to_csv [id, description, service_item_id] end |