Class: Ruby::Fillform::Field
- Inherits:
-
Object
- Object
- Ruby::Fillform::Field
- Includes:
- Prawn::Document::Internals
- Defined in:
- lib/ruby-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
16 17 18 |
# File 'lib/ruby-fillform.rb', line 16 def initialize(dictionary) @dictionary = dictionary end |
Instance Method Details
#default_value ⇒ Object
52 53 54 |
# File 'lib/ruby-fillform.rb', line 52 def default_value deref(@dictionary[:DV]) end |
#description ⇒ Object
20 21 22 |
# File 'lib/ruby-fillform.rb', line 20 def description deref(@dictionary[:TU]) end |
#flags ⇒ Object
56 57 58 |
# File 'lib/ruby-fillform.rb', line 56 def flags deref(@dictionary[:Ff]) end |
#height ⇒ Object
44 45 46 |
# File 'lib/ruby-fillform.rb', line 44 def height rect[3] - rect[1] end |
#name ⇒ Object
28 29 30 |
# File 'lib/ruby-fillform.rb', line 28 def name deref(@dictionary[:T]).to_sym end |
#rect ⇒ Object
24 25 26 |
# File 'lib/ruby-fillform.rb', line 24 def rect deref(@dictionary[:Rect]) end |
#value ⇒ Object
48 49 50 |
# File 'lib/ruby-fillform.rb', line 48 def value deref(@dictionary[:V]) end |
#width ⇒ Object
40 41 42 |
# File 'lib/ruby-fillform.rb', line 40 def width rect[2] - rect[0] end |
#x ⇒ Object
32 33 34 |
# File 'lib/ruby-fillform.rb', line 32 def x rect[0] end |
#y ⇒ Object
36 37 38 |
# File 'lib/ruby-fillform.rb', line 36 def y rect[3] end |