Class: Prawn::SwissQRBill::QR::Data::Field

Inherits:
Struct
  • Object
show all
Defined in:
lib/prawn/swiss_qr_bill/qr/data.rb

Overview

Field structure:

  • :default => default value to be set, if key is not given

  • :format => Proc to call when generating output

  • :skippable => Do not output in QR data if not given

  • :validation => Proc or symbol for validation

    • if Proc given: will be called with value as argument

    • if symbol given: method “#:symbol_validator” will be called with value as argument

Instance Attribute Summary collapse

Instance Attribute Details

#defaultObject

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



23
24
25
# File 'lib/prawn/swiss_qr_bill/qr/data.rb', line 23

def default
  @default
end

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



23
24
25
# File 'lib/prawn/swiss_qr_bill/qr/data.rb', line 23

def format
  @format
end

#skippableObject

Returns the value of attribute skippable

Returns:

  • (Object)

    the current value of skippable



23
24
25
# File 'lib/prawn/swiss_qr_bill/qr/data.rb', line 23

def skippable
  @skippable
end

#validationObject

Returns the value of attribute validation

Returns:

  • (Object)

    the current value of validation



23
24
25
# File 'lib/prawn/swiss_qr_bill/qr/data.rb', line 23

def validation
  @validation
end