Class: PSD::LayerInfo
- Inherits:
-
Object
- Object
- PSD::LayerInfo
- Defined in:
- lib/psd/layer_info.rb
Overview
Parent class for all of the extra layer info.
Direct Known Subclasses
FillOpacity, LayerID, LayerNameSource, LayerSectionDivider, ObjectEffects, PlacedLayer, ReferencePoint, TypeTool, UnicodeName, VectorMask
Class Attribute Summary collapse
-
.key ⇒ Object
Returns the value of attribute key.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(file, length) ⇒ LayerInfo
constructor
A new instance of LayerInfo.
-
#parse ⇒ Object
Override this - default seeks to end of section.
Constructor Details
#initialize(file, length) ⇒ LayerInfo
Returns a new instance of LayerInfo.
10 11 12 13 14 15 |
# File 'lib/psd/layer_info.rb', line 10 def initialize(file, length) @file = file @length = length @section_end = @file.tell + @length @data = {} end |
Class Attribute Details
.key ⇒ Object
Returns the value of attribute key.
7 8 9 |
# File 'lib/psd/layer_info.rb', line 7 def key @key end |
Instance Attribute Details
#data ⇒ Object (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
#parse ⇒ Object
Override this - default seeks to end of section
18 19 20 |
# File 'lib/psd/layer_info.rb', line 18 def parse @file.seek @section_end end |