Class: Kreuzberg::Result::Image

Inherits:
Struct
  • Object
show all
Defined in:
lib/kreuzberg/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bits_per_componentObject

Returns the value of attribute bits_per_component

Returns:

  • (Object)

    the current value of bits_per_component



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def bits_per_component
  @bits_per_component
end

#colorspaceObject

Returns the value of attribute colorspace

Returns:

  • (Object)

    the current value of colorspace



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def colorspace
  @colorspace
end

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def data
  @data
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def description
  @description
end

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def format
  @format
end

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def height
  @height
end

#image_indexObject

Returns the value of attribute image_index

Returns:

  • (Object)

    the current value of image_index



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def image_index
  @image_index
end

#is_maskObject

Returns the value of attribute is_mask

Returns:

  • (Object)

    the current value of is_mask



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def is_mask
  @is_mask
end

#ocr_resultObject

Returns the value of attribute ocr_result

Returns:

  • (Object)

    the current value of ocr_result



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def ocr_result
  @ocr_result
end

#page_numberObject

Returns the value of attribute page_number

Returns:

  • (Object)

    the current value of page_number



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def page_number
  @page_number
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



70
71
72
# File 'lib/kreuzberg/result.rb', line 70

def width
  @width
end

Instance Method Details

#to_hObject



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/kreuzberg/result.rb', line 84

def to_h
  {
    data: data,
    format: format,
    image_index: image_index,
    page_number: page_number,
    width: width,
    height: height,
    colorspace: colorspace,
    bits_per_component: bits_per_component,
    is_mask: is_mask,
    description: description,
    ocr_result: ocr_result&.to_h
  }
end