Class: ZSteg::Checker::Zlib::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/zsteg/checker/zlib.rb

Constant Summary collapse

MAX_SHOW_SIZE =
100

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



10
11
12
# File 'lib/zsteg/checker/zlib.rb', line 10

def data
  @data
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



10
11
12
# File 'lib/zsteg/checker/zlib.rb', line 10

def offset
  @offset
end

Instance Method Details

#to_sObject



13
14
15
16
17
# File 'lib/zsteg/checker/zlib.rb', line 13

def to_s
  x = data
  x=x[0,MAX_SHOW_SIZE] + "..." if x.size > MAX_SHOW_SIZE
  "zlib: data=#{x.inspect.bright_red}, offset=#{offset}, size=#{data.size}"
end