Class: Id3Taginator::Frames::Picture::Entities::Picture
- Inherits:
-
Object
- Object
- Id3Taginator::Frames::Picture::Entities::Picture
- Includes:
- Extensions::Comparable
- Defined in:
- lib/id3taginator/frames/picture/entities/picture.rb
Instance Attribute Summary collapse
-
#descriptor ⇒ Object
Returns the value of attribute descriptor.
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
-
#picture_data ⇒ Object
Returns the value of attribute picture_data.
-
#picture_type ⇒ Object
Returns the value of attribute picture_type.
Instance Method Summary collapse
-
#initialize(mime_type, picture_type, descriptor, picture_data) ⇒ Picture
constructor
constructor.
- #write_picture(file) ⇒ Object
Methods included from Extensions::Comparable
Constructor Details
#initialize(mime_type, picture_type, descriptor, picture_data) ⇒ Picture
constructor
18 19 20 21 22 23 |
# File 'lib/id3taginator/frames/picture/entities/picture.rb', line 18 def initialize(mime_type, picture_type, descriptor, picture_data) @mime_type = mime_type @picture_type = picture_type @descriptor = descriptor @picture_data = picture_data end |
Instance Attribute Details
#descriptor ⇒ Object
Returns the value of attribute descriptor.
10 11 12 |
# File 'lib/id3taginator/frames/picture/entities/picture.rb', line 10 def descriptor @descriptor end |
#mime_type ⇒ Object
Returns the value of attribute mime_type.
10 11 12 |
# File 'lib/id3taginator/frames/picture/entities/picture.rb', line 10 def mime_type @mime_type end |
#picture_data ⇒ Object
Returns the value of attribute picture_data.
10 11 12 |
# File 'lib/id3taginator/frames/picture/entities/picture.rb', line 10 def picture_data @picture_data end |
#picture_type ⇒ Object
Returns the value of attribute picture_type.
10 11 12 |
# File 'lib/id3taginator/frames/picture/entities/picture.rb', line 10 def picture_type @picture_type end |
Instance Method Details
#write_picture(file) ⇒ Object
25 26 27 |
# File 'lib/id3taginator/frames/picture/entities/picture.rb', line 25 def write_picture(file) File.open(file, 'wb') { |f| f.write(@picture_data) } end |