Class: YoutubeTools::Converter
- Inherits:
-
Object
- Object
- YoutubeTools::Converter
- Defined in:
- lib/youtube_tools/converter.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#folder ⇒ Object
Returns the value of attribute folder.
-
#format ⇒ Object
Returns the value of attribute format.
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
#initialize(file, options = {}) ⇒ Converter
Returns a new instance of Converter.
5 6 7 8 9 10 11 12 |
# File 'lib/youtube_tools/converter.rb', line 5 def initialize(file, ={}) @folder = [:path].nil? ? FOLDER_PATH : [:path] @format = [:format].nil? ? :mp3 : [:format] @file = "#{@folder}/#{file}" converter_to(@format) end |
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file.
3 4 5 |
# File 'lib/youtube_tools/converter.rb', line 3 def file @file end |
#file_name ⇒ Object
Returns the value of attribute file_name.
3 4 5 |
# File 'lib/youtube_tools/converter.rb', line 3 def file_name @file_name end |
#folder ⇒ Object
Returns the value of attribute folder.
3 4 5 |
# File 'lib/youtube_tools/converter.rb', line 3 def folder @folder end |
#format ⇒ Object
Returns the value of attribute format.
3 4 5 |
# File 'lib/youtube_tools/converter.rb', line 3 def format @format end |