lib/checkm/manifest.rb in checkm-0.1.0 vs lib/checkm/manifest.rb in checkm-0.1.1

- old
+ new

@@ -7,18 +7,18 @@ attr_reader :fields attr_reader :path attr_accessor :entries - def initialize str_io_or_file, args = {} + def initialize str_io_or_file = '', args = {} @source = str_io_or_file @args = args @entries = [] @eof = args[:eof] @version = args[:version] - @fields = args[:ields] + @fields = args[:fields] @path = args[:path] @path ||= Dir.pwd parse_lines(@source) @@ -36,9 +36,11 @@ return true if @entries.empty? not @entries.map { |e| e.valid? }.any? { |b| b == false } end def add path_or_entry, args = {} + args[:options] ||= options_for_entries + @entries << Checkm::Entry.create(path_or_entry, args) end alias_method :<<, :add