Class: TagFile::Document
- Inherits:
-
Object
- Object
- TagFile::Document
- Defined in:
- lib/tagfile/document.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(path) ⇒ Document
constructor
A new instance of Document.
Constructor Details
#initialize(path) ⇒ Document
Returns a new instance of Document.
13 14 15 16 17 18 19 20 |
# File 'lib/tagfile/document.rb', line 13 def initialize(path) @path = verify_presence_of(path) @filename = File.basename(@path) @format = verify_format_of(@path) @taglib = TagLib::File.new(@path) @tags = make_tag_attributes @errors = run_all_verifications end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
11 12 13 |
# File 'lib/tagfile/document.rb', line 11 def errors @errors end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
10 11 12 |
# File 'lib/tagfile/document.rb', line 10 def path @path end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
10 11 12 |
# File 'lib/tagfile/document.rb', line 10 def @tags end |