Class: Id3Taginator::Frames::Id3v23FrameFlags
- Inherits:
-
Object
- Object
- Id3Taginator::Frames::Id3v23FrameFlags
- Defined in:
- lib/id3taginator/frames/id3v23_frame_flags.rb
Instance Method Summary collapse
-
#compression? ⇒ Boolean
determined if the frame is compressed.
-
#encryption? ⇒ Boolean
determined if the frame is encrypted.
-
#file_alter_preservation? ⇒ Boolean
determined if the file is alter preserved.
-
#group_identity? ⇒ Boolean
determined if the frame has a group identity.
-
#initialize(flags) ⇒ Id3v23FrameFlags
constructor
A new instance of Id3v23FrameFlags.
-
#read_only? ⇒ Boolean
determined if the file frame is read only.
-
#tag_alter_preservation? ⇒ Boolean
determined if the frame is alter preserved.
- #to_bytes ⇒ Object
Constructor Details
#initialize(flags) ⇒ Id3v23FrameFlags
Returns a new instance of Id3v23FrameFlags.
7 8 9 |
# File 'lib/id3taginator/frames/id3v23_frame_flags.rb', line 7 def initialize(flags) @flags = flags end |
Instance Method Details
#compression? ⇒ Boolean
determined if the frame is compressed
42 43 44 45 |
# File 'lib/id3taginator/frames/id3v23_frame_flags.rb', line 42 def compression? flag = @flags.bytes[1] (flag & 0b1000_0000) == 0b1000_0000 end |
#encryption? ⇒ Boolean
determined if the frame is encrypted
50 51 52 53 |
# File 'lib/id3taginator/frames/id3v23_frame_flags.rb', line 50 def encryption? flag = @flags.bytes[1] (flag & 0b0100_0000) == 0b0100_0000 end |
#file_alter_preservation? ⇒ Boolean
determined if the file is alter preserved
26 27 28 29 |
# File 'lib/id3taginator/frames/id3v23_frame_flags.rb', line 26 def file_alter_preservation? flag = @flags.bytes[0] (flag & 0b0100_0000) == 0b0100_0000 end |
#group_identity? ⇒ Boolean
determined if the frame has a group identity
58 59 60 61 |
# File 'lib/id3taginator/frames/id3v23_frame_flags.rb', line 58 def group_identity? flag = @flags.bytes[1] (flag & 0b0010_0000) == 0b0010_0000 end |
#read_only? ⇒ Boolean
determined if the file frame is read only
34 35 36 37 |
# File 'lib/id3taginator/frames/id3v23_frame_flags.rb', line 34 def read_only? flag = @flags.bytes[0] (flag & 0b0010_0000) == 0b0010_0000 end |
#tag_alter_preservation? ⇒ Boolean
determined if the frame is alter preserved
18 19 20 21 |
# File 'lib/id3taginator/frames/id3v23_frame_flags.rb', line 18 def tag_alter_preservation? flag = @flags.bytes[0] (flag & 0b1000_0000) == 0b1000_0000 end |
#to_bytes ⇒ Object
11 12 13 |
# File 'lib/id3taginator/frames/id3v23_frame_flags.rb', line 11 def to_bytes @flags end |