Method: Musical::DVD.load

Defined in:
lib/musical/dvd.rb

.load(options = {}) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/musical/dvd.rb', line 37

def self.load(options = {})
  if @@path.nil? || options[:forcibly]
    @@path = options[:path] || self.detect
  end

  dvd = DVD.instance
  dvd.title  = options[:title]  || Musical.configuration.title
  dvd.artist = options[:artist] || Musical.configuration.artist
  dvd.year   = options[:year]   || Musical.configuration.year

  if block_given?
    yield(dvd)
  end

  dvd.info
end