prawn-templates 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ba8d3f0f503dff4534427f7e4241b9d243e0b0e
4
- data.tar.gz: 7558cd2f51905496048a161e809ee4867fc843aa
3
+ metadata.gz: 4675a2da68897899907ad2cd9ca41f965795c529
4
+ data.tar.gz: dad0a841287c217ba076dcdf054d8f406a5921b2
5
5
  SHA512:
6
- metadata.gz: fd48bcd2e0d9a15a50411a8e9b7cca6fc32740f775947e49a7dac7cebc686a4264f036b1cebfce497ed7f72e7b2dd414e9a1e7dc57c9ec070fa49fa32339927e
7
- data.tar.gz: 5fdec6b7f9fe417fac62981733bb74599970260551c3506f0fc46da8d3c466b109555303ac72230d903868f8b604564961355a32b436ae3db988e2dc2bf77e5e
6
+ metadata.gz: 3f26464256ebf5e75af2744dac364cc02299f81953a3f2edd8298987d9ec8e81abadc15b97bc838dad6feade30572aa9b7f9f21fa1cc7434ed86113777c38dc3
7
+ data.tar.gz: 52fa48e4bdc6371d89fbf2a5ddebfbad0867465f65eae7458f0021e8e140c659c47fe673454482eb25a521d8be32b9f5b169e03f91ee61cff705140bb77eaee9
@@ -1,6 +1,7 @@
1
1
  module PDF
2
2
  module Core
3
3
  class DocumentState #:nodoc:
4
+ alias __initialize initialize
4
5
  def initialize(options)
5
6
  normalize_metadata(options)
6
7
 
@@ -1,6 +1,7 @@
1
1
  module PDF
2
2
  module Core
3
3
  class ObjectStore #:nodoc:
4
+ alias __initialize initialize
4
5
  def initialize(opts = {})
5
6
  @objects = {}
6
7
  @identifiers = []
@@ -17,6 +18,7 @@ module PDF
17
18
  end
18
19
  end
19
20
 
21
+ alias __utf8? utf8? if method_defined? :utf8?
20
22
  def utf8?(str)
21
23
  str.force_encoding(::Encoding::UTF_8)
22
24
  str.valid_encoding?
@@ -1,6 +1,7 @@
1
1
  module PDF
2
2
  module Core
3
3
  class Page #:nodoc:
4
+ alias __initialize initialize
4
5
  def initialize(document, options = {})
5
6
  @document = document
6
7
  @margins = options[:margins] || {
@@ -36,10 +37,13 @@ module PDF
36
37
  document.open_graphics_state
37
38
  end
38
39
 
39
- def imported_page?
40
- @imported_page
40
+ unless method_defined? :imported_page?
41
+ def imported_page?
42
+ @imported_page
43
+ end
41
44
  end
42
45
 
46
+ alias __dimensions dimensions if method_defined? :dimensions
43
47
  def dimensions
44
48
  return inherited_dictionary_value(:MediaBox) if imported_page?
45
49
 
@@ -56,6 +60,9 @@ module PDF
56
60
  end
57
61
  end
58
62
 
63
+ if method_defined? :init_from_object
64
+ alias __init_from_object init_from_object
65
+ end
59
66
  def init_from_object(options)
60
67
  @dictionary = options[:object_id].to_i
61
68
  if options[:page_template]
@@ -71,6 +78,7 @@ module PDF
71
78
  @imported_page = true
72
79
  end
73
80
 
81
+ alias __init_new_page init_new_page if method_defined? :init_new_page
74
82
  def init_new_page(options)
75
83
  @size = options[:size] || 'LETTER'
76
84
  @layout = options[:layout] || :portrait
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Brown