lib/psd/resources/layer_comps.rb in psd-0.4.1 vs lib/psd/resources/layer_comps.rb in psd-0.4.2
- old
+ new
@@ -6,10 +6,20 @@
def self.name; :layer_comps; end
def parse
# Descriptor version
@file.seek 4, IO::SEEK_CUR
- @resource.data = Descriptor.new(@file).parse
+
+ @data = Descriptor.new(@file).parse
+ @resource.data = self
+ end
+
+ def names
+ @data['list'].map { |c| c['Nm '] }
+ end
+
+ def [](val)
+ @data[val]
end
end
end
end
end
\ No newline at end of file