Class: PdfTempura::Document::Page
- Inherits:
-
Object
- Object
- PdfTempura::Document::Page
- Includes:
- DefaultCommands, Validation
- Defined in:
- lib/pdf_tempura/document/page.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #data ⇒ Object
- #data=(data) ⇒ Object
-
#initialize(page_number, options = {}) ⇒ Page
constructor
A new instance of Page.
Methods included from DefaultCommands
#boxed_characters, #checkbox_field, #field_set, included, #table, #text_field, #with_default_options
Methods included from Validation
Constructor Details
#initialize(page_number, options = {}) ⇒ Page
Returns a new instance of Page.
6 7 8 9 10 11 12 |
# File 'lib/pdf_tempura/document/page.rb', line 6 def initialize(page_number, = {}) @number = page_number @fields = [] @options = validate! end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
14 15 16 |
# File 'lib/pdf_tempura/document/page.rb', line 14 def number @number end |
Instance Method Details
#==(other) ⇒ Object
18 19 20 |
# File 'lib/pdf_tempura/document/page.rb', line 18 def ==(other) self.number == other.number end |
#data ⇒ Object
22 23 24 |
# File 'lib/pdf_tempura/document/page.rb', line 22 def data @data ||= {} end |
#data=(data) ⇒ Object
26 27 28 |
# File 'lib/pdf_tempura/document/page.rb', line 26 def data=(data) @data = data.extend(Extensions::Hash::StringifyKeys).stringify_keys! end |