Class: TheNoises::CLI
- Inherits:
-
Thor
- Object
- Thor
- TheNoises::CLI
- Defined in:
- lib/the-noises.rb
Constant Summary collapse
- SUBDIR_NAME =
"the-noises"
- BASE_URL =
"http://enterjam.net/podcast/noises/"
- RSS_URL =
"http://enterjam.net/noises.xml"
Instance Method Summary collapse
- #download(index) ⇒ Object
-
#initialize(args = [], options = {}, config = {}) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(args = [], options = {}, config = {}) ⇒ CLI
Returns a new instance of CLI.
13 14 15 |
# File 'lib/the-noises.rb', line 13 def initialize(args = [], = {}, config = {}) super end |
Instance Method Details
#download(index) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/the-noises.rb', line 21 def download(index) begin i=Integer(index) rescue raise ArgumentError, "#{index} is not integer" end self.destination_root = [:dst] url = BASE_URL + "#{index}.mp3" show_title(url) save(url) end |