Class: Traktor::NML::File
- Inherits:
-
Object
- Object
- Traktor::NML::File
- Defined in:
- lib/traktor/nml/file.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#playlist ⇒ Object
readonly
Returns the value of attribute playlist.
Instance Method Summary collapse
-
#initialize(content) ⇒ File
constructor
A new instance of File.
Constructor Details
#initialize(content) ⇒ File
Returns a new instance of File.
10 11 12 13 14 15 |
# File 'lib/traktor/nml/file.rb', line 10 def initialize(content) doc = Oga.parse_xml content @collection = Traktor::NML::Collection.new doc.xpath('NML/COLLECTION/ENTRY') @playlist = Traktor::NML::Playlist.new doc.xpath('NML/PLAYLISTS'), @collection end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
8 9 10 |
# File 'lib/traktor/nml/file.rb', line 8 def collection @collection end |
#playlist ⇒ Object (readonly)
Returns the value of attribute playlist.
8 9 10 |
# File 'lib/traktor/nml/file.rb', line 8 def playlist @playlist end |