Class: JXL::Container::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/jxl/container/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, ignore_brob: false) ⇒ Parser

Returns a new instance of Parser.



8
9
10
11
12
13
14
# File 'lib/jxl/container/parser.rb', line 8

def initialize(data, ignore_brob: false)
  @data = data.b
  @metadata = {}
  @level = 5
  @boxes = []
  parse(ignore_brob)
end

Instance Attribute Details

#codestreamObject (readonly)

Returns the value of attribute codestream.



6
7
8
# File 'lib/jxl/container/parser.rb', line 6

def codestream
  @codestream
end

#levelObject (readonly)

Returns the value of attribute level.



6
7
8
# File 'lib/jxl/container/parser.rb', line 6

def level
  @level
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6
7
8
# File 'lib/jxl/container/parser.rb', line 6

def 
  @metadata
end

Instance Method Details

#each_box(&block) ⇒ Object



16
17
18
19
20
# File 'lib/jxl/container/parser.rb', line 16

def each_box(&block)
  return @boxes.each unless block

  @boxes.each(&block)
end