apple_png 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/apple_png.rb +2 -4
  2. metadata +1 -1
data/lib/apple_png.rb CHANGED
@@ -4,6 +4,7 @@ class NotValidApplePngError < StandardError; end
4
4
 
5
5
  class ApplePng
6
6
  attr_accessor :width, :height
7
+ attr_reader :raw_data
7
8
 
8
9
  # Create a new ApplePng instance from Apple PNG data in a string
9
10
  # @param apple_png_data [String] Binary string containing Apple PNG data, probably read from a file
@@ -15,10 +16,7 @@ class ApplePng
15
16
  # Get the PNG data as string. The conversion from Apple PNG data to standard PNG data will be performed when this method is first called.
16
17
  # @return [String] Binary string containing standard PNG data
17
18
  def data
18
- if @data.nil?
19
- @data = self.convert_apple_png(@raw_data)
20
- @raw_data = nil
21
- end
19
+ @data = self.convert_apple_png(@raw_data) if @data.nil?
22
20
  return @data
23
21
  end
24
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apple_png
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: