Class: Cul::Image::Properties::Exif::FieldType

Inherits:
Object
  • Object
show all
Defined in:
lib/cul_image_props/image/properties/exif/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#abbreviationObject

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

#lengthObject

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

#nameObject

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