Class: Cul::Image::Properties::Exif::FieldType
- Inherits:
-
Object
- Object
- Cul::Image::Properties::Exif::FieldType
- Defined in:
- lib/cul_image_props/image/properties/exif/types.rb
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
Returns the value of attribute abbreviation.
-
#length ⇒ Object
Returns the value of attribute length.
-
#name ⇒ Object
Returns the value of attribute name.
-
#signed ⇒ Object
Returns the value of attribute signed.
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(length, abb, name, signed = false) ⇒ FieldType
constructor
A new instance of FieldType.
Constructor Details
#initialize(length, abb, name, signed = false) ⇒ FieldType
Returns a new instance of FieldType.
8 9 10 11 12 13 |
# File 'lib/cul_image_props/image/properties/exif/types.rb', line 8 def initialize(length, abb, name, signed=false) @length = length @abbreviation = abb @name = name @signed = signed end |
Instance Attribute Details
#abbreviation ⇒ Object
Returns the value of attribute abbreviation.
7 8 9 |
# File 'lib/cul_image_props/image/properties/exif/types.rb', line 7 def abbreviation @abbreviation end |
#length ⇒ Object
Returns the value of attribute length.
7 8 9 |
# File 'lib/cul_image_props/image/properties/exif/types.rb', line 7 def length @length end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/cul_image_props/image/properties/exif/types.rb', line 7 def name @name end |
#signed ⇒ Object
Returns the value of attribute signed.
7 8 9 |
# File 'lib/cul_image_props/image/properties/exif/types.rb', line 7 def signed @signed end |
Instance Method Details
#[](index) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/cul_image_props/image/properties/exif/types.rb', line 14 def [](index) case index when 0 return @length when 1 return @abbreviation when 2 return @name else raise format("Unexpected index %s", index.to_s) end end |