Class: DerivativeRodeo::TechnicalMetadata
- Inherits:
-
Struct
- Object
- Struct
- DerivativeRodeo::TechnicalMetadata
- Defined in:
- lib/derivative_rodeo/technical_metadata.rb
Instance Attribute Summary collapse
-
#bits_per_component ⇒ Object
Returns the value of attribute bits_per_component.
-
#color ⇒ Object
Returns the value of attribute color.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#height ⇒ Object
Returns the value of attribute height.
-
#num_components ⇒ Object
(also: #number_of_components)
Returns the value of attribute num_components.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
Instance Attribute Details
#bits_per_component ⇒ Object
Returns the value of attribute bits_per_component
4 5 6 |
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4 def bits_per_component @bits_per_component end |
#color ⇒ Object
Returns the value of attribute color
4 5 6 |
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4 def color @color end |
#content_type ⇒ Object
Returns the value of attribute content_type
4 5 6 |
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4 def content_type @content_type end |
#height ⇒ Object
Returns the value of attribute height
4 5 6 |
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4 def height @height end |
#num_components ⇒ Object Also known as: number_of_components
Returns the value of attribute num_components
4 5 6 |
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4 def num_components @num_components end |
#width ⇒ Object
Returns the value of attribute width
4 5 6 |
# File 'lib/derivative_rodeo/technical_metadata.rb', line 4 def width @width end |
Instance Method Details
#monochrome? ⇒ Boolean
19 20 21 |
# File 'lib/derivative_rodeo/technical_metadata.rb', line 19 def monochrome? color.to_s.casecmp('monochrome').zero? end |
#to_hash ⇒ Object
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 |