lib/grom/reader.rb in grom-0.6.1 vs lib/grom/reader.rb in grom-1.0.0

- old
+ new

@@ -8,15 +8,16 @@ # @attr_reader [Array] objects Grom::Node objects generated from n-triple data. class Reader attr_reader :data, :statements_by_subject, :edges_by_subject, :objects # @param [String] data n-triple data. - def initialize(data) + # @param [Module] decorators decorators to use when building Grom::Node objects. + def initialize(data, decorators = nil) @data = data read_data - @objects = Grom::Builder.new(self).objects + @objects = Grom::Builder.new(self, decorators).objects end # Reads the n-triple data and separates the statements by subject. # # @return [Grom::Reader] an instance of self.