Class: Ole::Types::PropertySet::Section

### Home Classes Methods

### In Files

- lib/ole/types/property_set.rb

### Parent

Object

### Methods

- ::new
- #[]
- #[]=
- #each
- #io
- #load_header

### Included Modules

- Ole::Types::Variant::Constants

### Files

- ChangeLog
- README

### Class/Module Index

Quicksearch

- Ole
- Ole::IOMode
- Ole::IOMode::Constants
- Ole::Storage
- Ole::Storage::AllocationTable
- Ole::Storage::AllocationTable::Big
- Ole::Storage::AllocationTable::Small
- Ole::Storage::DirClass
- Ole::Storage::DirClass::Dir
- Ole::Storage::Dirent
- Ole::Storage::FileClass
- Ole::Storage::FileClass::Stat
- Ole::Storage::Header
- Ole::Storage::MetaData
- Ole::Storage::RangesIOMigrateable
- Ole::Storage::RangesIOResizeable
- Ole::Types
- Ole::Types::Clsid
- Ole::Types::Data
- Ole::Types::FileTime
- Ole::Types::Lpstr
- Ole::Types::Lpwstr
- Ole::Types::PropertySet
- Ole::Types::PropertySet::Constants
- Ole::Types::PropertySet::Section
- Ole::Types::Variant
- Ole::Types::Variant::Constants
- RangesIO

No matching classes.

# Ole::Types::PropertySet::Section

### Constants

PACK
SIZE

### Attributes

guid[RW]
length[R]
offset[RW]

### Public Class Methods

new(str, property_set) click to toggle source

    # File lib/ole/types/property_set.rb, line 86
    def initialize str, property_set
      @property_set = property_set
      @guid, @offset = str.unpack PACK
      self.guid = Clsid.load guid
      load_header
    end

### Public Instance Methods

[](key) click to toggle source

    # File lib/ole/types/property_set.rb, line 102
    def [] key
      each_raw do |id, property_offset|
        return read_property(property_offset).last if key == id
      end
      nil
    end

[]=(key, value) click to toggle source

    # File lib/ole/types/property_set.rb, line 109
    def []= key, value
      raise NotImplementedError, 'section writes not yet implemented'
    end

each() click to toggle source

    # File lib/ole/types/property_set.rb, line 113
    def each
      each_raw do |id, property_offset|
        yield id, read_property(property_offset).last
      end
    end

io() click to toggle source

    # File lib/ole/types/property_set.rb, line 93
    def io
      @property_set.io
    end

load_header() click to toggle source

    # File lib/ole/types/property_set.rb, line 97
    def load_header
      io.seek offset
      @byte_size, @length = io.read(8).unpack 'V2'
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.