Class: Xspf2m3u::App
- Inherits:
-
Thor
- Object
- Thor
- Xspf2m3u::App
- Includes:
- Thor::Actions
- Defined in:
- lib/xspf2m3u/app.rb
Overview
Top-level app
Instance Method Summary collapse
Instance Method Details
#convert ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/xspf2m3u/app.rb', line 28 def convert from = [:infile] to = [:outfile] begin xspf = XSPF.new(File.read from) create_file to do xspf.to_xm3u end rescue Errno::ENOENT => raise Thor::Error, rescue NoMethodError raise Thor::Error, "Error parsing #{from}" end end |
#help(task = nil, subcommand = false) ⇒ Object
47 48 49 50 |
# File 'lib/xspf2m3u/app.rb', line 47 def help task = nil, subcommand = false say Help. if task.nil? super end |
#version ⇒ Object
10 11 12 |
# File 'lib/xspf2m3u/app.rb', line 10 def version say "xspf2m3u version #{VERSION}" end |