Class: Prawn::Fillform::Field
- Inherits:
-
Object
- Object
- Prawn::Fillform::Field
- Includes:
- Document::Internals
- Defined in:
- lib/prawn-fillform.rb
Instance Method Summary collapse
- #default_value ⇒ Object
- #description ⇒ Object
- #flags ⇒ Object
- #height ⇒ Object
-
#initialize(dictionary) ⇒ Field
constructor
A new instance of Field.
- #name ⇒ Object
- #rect ⇒ Object
- #value ⇒ Object
- #width ⇒ Object
- #x ⇒ Object
- #y ⇒ Object
Constructor Details
#initialize(dictionary) ⇒ Field
Returns a new instance of Field.
15 16 17 |
# File 'lib/prawn-fillform.rb', line 15 def initialize(dictionary) @dictionary = dictionary end |
Instance Method Details
#default_value ⇒ Object
51 52 53 |
# File 'lib/prawn-fillform.rb', line 51 def default_value deref(@dictionary[:DV]) end |
#description ⇒ Object
19 20 21 |
# File 'lib/prawn-fillform.rb', line 19 def description deref(@dictionary[:TU]) end |
#flags ⇒ Object
55 56 57 |
# File 'lib/prawn-fillform.rb', line 55 def flags deref(@dictionary[:Ff]) end |
#height ⇒ Object
43 44 45 |
# File 'lib/prawn-fillform.rb', line 43 def height rect[3] - rect[1] end |
#name ⇒ Object
27 28 29 |
# File 'lib/prawn-fillform.rb', line 27 def name deref(@dictionary[:T]).to_sym end |
#rect ⇒ Object
23 24 25 |
# File 'lib/prawn-fillform.rb', line 23 def rect deref(@dictionary[:Rect]) end |
#value ⇒ Object
47 48 49 |
# File 'lib/prawn-fillform.rb', line 47 def value deref(@dictionary[:V]) end |
#width ⇒ Object
39 40 41 |
# File 'lib/prawn-fillform.rb', line 39 def width rect[2] - rect[0] end |
#x ⇒ Object
31 32 33 |
# File 'lib/prawn-fillform.rb', line 31 def x rect[0] end |
#y ⇒ Object
35 36 37 |
# File 'lib/prawn-fillform.rb', line 35 def y rect[3] end |