Exception: BrInvoicesPdf::Errors::InvalidDocumentType

Inherits:
StandardError
  • Object
show all
Defined in:
lib/br_invoices_pdf/errors/invalid_document_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ InvalidDocumentType

Returns a new instance of InvalidDocumentType.



8
9
10
11
# File 'lib/br_invoices_pdf/errors/invalid_document_type.rb', line 8

def initialize(type)
  super("`#{type.inspect}` is not supported. Must be one of #{BrInvoicesPdf.supported_document_types}")
  @type = type
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/br_invoices_pdf/errors/invalid_document_type.rb', line 6

def type
  @type
end