Class: AudioTag::ID3::V2::Tag
- Inherits:
-
StreamSection
- Object
- StreamReader
- StreamSection
- AudioTag::ID3::V2::Tag
- Defined in:
- lib/audio_tag/id3/v2/tag.rb
Instance Attribute Summary collapse
-
#frames ⇒ Object
readonly
Returns the value of attribute frames.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
Attributes inherited from StreamReader
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(stream) ⇒ Tag
constructor
A new instance of Tag.
- #to_h ⇒ Object
Methods inherited from StreamReader
#read, #read!, #read_byte, #read_byte!, #read_bytes, #read_bytes!, #read_bytes_until, #read_bytes_until!, #read_until, #read_until!
Constructor Details
Instance Attribute Details
#frames ⇒ Object (readonly)
Returns the value of attribute frames.
5 6 7 |
# File 'lib/audio_tag/id3/v2/tag.rb', line 5 def frames @frames end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
5 6 7 |
# File 'lib/audio_tag/id3/v2/tag.rb', line 5 def header @header end |
Class Method Details
.from_file(path) ⇒ Object
17 18 19 |
# File 'lib/audio_tag/id3/v2/tag.rb', line 17 def self.from_file(path) File.open(path) { |file| new(file) } end |
Instance Method Details
#to_h ⇒ Object
13 14 15 |
# File 'lib/audio_tag/id3/v2/tag.rb', line 13 def to_h FrameMerger.new(frames).merge end |