Class: PdfTempura::Document::CheckboxField

Inherits:
Field::Base
  • Object
show all
Defined in:
lib/pdf_tempura/document/checkbox_field.rb

Instance Attribute Summary collapse

Attributes inherited from Field::Base

#coordinates, #dimensions, #name

Instance Method Summary collapse

Methods inherited from Field::Base

#height, #initialize, #width, #x, #y

Methods included from Validation

included

Constructor Details

This class inherits a constructor from PdfTempura::Document::Field::Base

Instance Attribute Details

#default_valueObject (readonly)

Returns the value of attribute default_value.



4
5
6
# File 'lib/pdf_tempura/document/checkbox_field.rb', line 4

def default_value
  @default_value
end

#paddingObject (readonly)

Returns the value of attribute padding.



4
5
6
# File 'lib/pdf_tempura/document/checkbox_field.rb', line 4

def padding
  @padding
end

Instance Method Details

#load_options(options) ⇒ Object



9
10
11
12
# File 'lib/pdf_tempura/document/checkbox_field.rb', line 9

def load_options(options)
  @default_value = options["default_value"] || false
  @padding = options["padding"] || [1,1,1,1]
end