Module: Id3Taginator::Extensions::Optionable
- Included in:
- AudioFile, Id3Taginator
- Defined in:
- lib/id3taginator/extensions/optionable.rb
Instance Method Summary collapse
-
#add_size_frame(add_frame = true) ⇒ Self
Returns self for builder style.
-
#default_decode_for_destination(encoding) ⇒ Self
sets the default decoding for destination.
-
#default_encode_for_destination(encoding) ⇒ Self
sets the default encoding for destination.
-
#ignore_v23_frame_error(ignore = true) ⇒ Self
if true, does not throw an error if a frame is added that is not supported for 2.3 e.g.
-
#ignore_v24_frame_error(ignore = true) ⇒ Self
if true, does not throw an error if a frame is added that is not supported for 2.4 e.g.
-
#tag_padding(number_bytes) ⇒ Self
sets the padding.
Instance Method Details
#add_size_frame(add_frame = true) ⇒ Self
Returns self for builder style
67 68 69 70 |
# File 'lib/id3taginator/extensions/optionable.rb', line 67 def add_size_frame(add_frame = true) @options.add_size_frame = add_frame self end |
#default_decode_for_destination(encoding) ⇒ Self
sets the default decoding for destination
23 24 25 26 27 28 |
# File 'lib/id3taginator/extensions/optionable.rb', line 23 def default_decode_for_destination(encoding) raise Errors::Id3TagError, 'Encoding can\'t be nil' if encoding.nil? @options.default_decode_dest = encoding self end |
#default_encode_for_destination(encoding) ⇒ Self
sets the default encoding for destination
11 12 13 14 15 16 |
# File 'lib/id3taginator/extensions/optionable.rb', line 11 def default_encode_for_destination(encoding) raise Errors::Id3TagError, 'Encoding can\'t be nil' if encoding.nil? @options.default_encode_dest = encoding self end |
#ignore_v23_frame_error(ignore = true) ⇒ Self
if true, does not throw an error if a frame is added that is not supported for 2.3 e.g. Sort Order Frames
46 47 48 49 |
# File 'lib/id3taginator/extensions/optionable.rb', line 46 def ignore_v23_frame_error(ignore = true) @options.ignore_v23_frame_error = ignore self end |
#ignore_v24_frame_error(ignore = true) ⇒ Self
if true, does not throw an error if a frame is added that is not supported for 2.4 e.g. Size Frame
56 57 58 59 |
# File 'lib/id3taginator/extensions/optionable.rb', line 56 def ignore_v24_frame_error(ignore = true) @options.ignore_v24_frame_error = ignore self end |
#tag_padding(number_bytes) ⇒ Self
sets the padding
35 36 37 38 39 |
# File 'lib/id3taginator/extensions/optionable.rb', line 35 def tag_padding(number_bytes) number_bytes = 0 if number_bytes.nil? @options.padding_bytes = number_bytes self end |