Class: DerivativeRodeo::TechnicalMetadata

Inherits:
Struct
  • Object
show all
Defined in:
lib/derivative_rodeo/technical_metadata.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



4
5
6
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4

def bits_per_component
  @bits_per_component
end

#colorObject

Returns the value of attribute color

Returns:

  • (Object)

    the current value of color



4
5
6
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4

def color
  @color
end

#content_typeObject

Returns the value of attribute content_type

Returns:

  • (Object)

    the current value of content_type



4
5
6
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4

def content_type
  @content_type
end

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



4
5
6
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4

def height
  @height
end

#num_componentsObject Also known as: number_of_components

Returns the value of attribute num_components

Returns:

  • (Object)

    the current value of num_components



4
5
6
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4

def num_components
  @num_components
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



4
5
6
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4

def width
  @width
end

Instance Method Details

#monochrome?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/derivative_rodeo/technical_metadata.rb', line 19

def monochrome?
  color.to_s.casecmp('monochrome').zero?
end

#to_hashObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/derivative_rodeo/technical_metadata.rb', line 8

def to_hash
  {
    color: color,
    num_components: num_components,
    bits_per_component: bits_per_component,
    width: width,
    height: height,
    content_type: content_type
  }
end