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.
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(length, abb, name) ⇒ FieldType
constructor
A new instance of FieldType.
Constructor Details
#initialize(length, abb, name) ⇒ FieldType
Returns a new instance of FieldType.
8 9 10 11 12 |
# File 'lib/cul_image_props/image/properties/exif/types.rb', line 8 def initialize(length, abb, name) @length = length @abbreviation = abb @name = name 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 |
Instance Method Details
#[](index) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cul_image_props/image/properties/exif/types.rb', line 13 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 |