module DVR
Constants
- VERSION
Attributes
configuration[RW]
Public Instance Methods
configure() { |configuration| ... }
click to toggle source
# File lib/dvr/configuration.rb, line 51 def configure yield(configuration) @configuration end
download_location()
click to toggle source
# File lib/dvr.rb, line 31 def download_location @download_location ||= File.join(DVR.configuration.full_destination, DVR.configuration.filename) end
play()
click to toggle source
# File lib/dvr.rb, line 13 def play `bundle exec ruby #{DVR.configuration.recording_location}` end
prep_destination()
click to toggle source
# File lib/dvr.rb, line 35 def prep_destination unless File.directory?(DVR.configuration.destination) FileUtils.mkdir_p(DVR.configuration.destination) puts "Created destination directory at #{DVR.configuration.destination}" else puts "Used existing destination directory at #{DVR.configuration.destination}" end end
record()
click to toggle source
# File lib/dvr.rb, line 17 def record raise DVR::InvalidConfiguration unless configuration.episode_location recorder.get_season end
record_and_download()
click to toggle source
# File lib/dvr.rb, line 22 def record_and_download record.download puts "Downloaded to #{download_location}" end
recorder()
click to toggle source
# File lib/dvr.rb, line 27 def recorder @recorder ||= Recorder.new end