Class: PSD::Resource
- Inherits:
-
Object
- Object
- PSD::Resource
- Defined in:
- lib/psd/resource.rb,
lib/psd/resources/base.rb,
lib/psd/resource_section.rb,
lib/psd/resources/guides.rb,
lib/psd/resources/slices.rb,
lib/psd/resources/work_path.rb,
lib/psd/resources/saved_path.rb,
lib/psd/resources/layer_comps.rb,
lib/psd/resources/xmp_metadata.rb,
lib/psd/resources/resolution_info.rb
Overview
Definition for a single Resource record.
Most of the resources are options/preferences set by the user or automatically by Photoshop.
Defined Under Namespace
Modules: Section
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(file) ⇒ Resource
constructor
A new instance of Resource.
- #parse ⇒ Object
Constructor Details
#initialize(file) ⇒ Resource
Returns a new instance of Resource.
10 11 12 13 14 |
# File 'lib/psd/resource.rb', line 10 def initialize(file) @file = file @data = {} @type = nil end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
8 9 10 |
# File 'lib/psd/resource.rb', line 8 def data @data end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/psd/resource.rb', line 7 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/psd/resource.rb', line 7 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
7 8 9 |
# File 'lib/psd/resource.rb', line 7 def size @size end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/psd/resource.rb', line 7 def type @type end |