Class: PSD::LayerInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/psd/layer_info.rb

Overview

Parent class for all of the extra layer info.

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(layer, length) ⇒ LayerInfo

Returns a new instance of LayerInfo.



10
11
12
13
14
15
16
# File 'lib/psd/layer_info.rb', line 10

def initialize(layer, length)
  @layer = layer
  @file = layer.file
  @length = length
  @section_end = @file.tell + @length
  @data = {}
end

Class Attribute Details

.keyObject

Returns the value of attribute key.



7
8
9
# File 'lib/psd/layer_info.rb', line 7

def key
  @key
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/psd/layer_info.rb', line 4

def data
  @data
end

Instance Method Details

#parseObject

Override this - default seeks to end of section



23
24
25
# File 'lib/psd/layer_info.rb', line 23

def parse
  skip
end

#skipObject



18
19
20
# File 'lib/psd/layer_info.rb', line 18

def skip
  @file.seek @section_end
end