lib/mediainfo.rb in mediainfo-0.7.0 vs lib/mediainfo.rb in mediainfo-0.7.1

- old
+ new

@@ -158,10 +158,12 @@ # alone to focus on refactoring the interface to the streams # before I refactor the attribute reader implementations. @parsed_response = { @stream_type => {} } end + attr_reader :parsed_response + def [](k); @parsed_response[@stream_type][k]; end def []=(k,v); @parsed_response[@stream_type][k] = v; end Mediainfo::SECTIONS.each { |t| define_method("#{t}?") { t == @stream_type } } end @@ -319,12 +321,11 @@ }, __FILE__, __LINE__ end ### - attr_reader :raw_response, :parsed_response, - :full_filename, :filename, :path, :escaped_full_filename + attr_reader :raw_response, :full_filename, :filename, :path, :escaped_full_filename ### def initialize(full_filename = nil) if mediainfo_version < "0.7.25" @@ -341,10 +342,10 @@ @filename = File.basename @full_filename raise ArgumentError, "need a path to a video file, got nil" unless @full_filename raise ArgumentError, "need a path to a video file, #{@full_filename} does not exist" unless File.exist? @full_filename - @escaped_full_filename = @full_filename.shell_escape + @escaped_full_filename = @full_filename.shell_escape_double_quotes self.raw_response = mediainfo! end end