Class: PSD::Knockout
- Defined in:
- lib/psd/layer/info/knockout.rb
Constant Summary collapse
- MODES =
[:shallow, :deep]
Instance Attribute Summary collapse
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
Attributes inherited from LayerInfo
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from LayerInfo
Constructor Details
This class inherits a constructor from PSD::LayerInfo
Instance Attribute Details
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
11 12 13 |
# File 'lib/psd/layer/info/knockout.rb', line 11 def enabled @enabled end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
11 12 13 |
# File 'lib/psd/layer/info/knockout.rb', line 11 def mode @mode end |
Class Method Details
.should_parse?(key) ⇒ Boolean
5 6 7 |
# File 'lib/psd/layer/info/knockout.rb', line 5 def self.should_parse?(key) key == 'knko' end |
Instance Method Details
#parse ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/psd/layer/info/knockout.rb', line 13 def parse val = @file.read_byte @enabled = val > 0 @mode = MODES[val - 1] @file.seek 3, IO::SEEK_CUR end |