Class: RDF::SPARQL::Reader
- Inherits:
-
Reader
- Object
- Reader
- RDF::SPARQL::Reader
- Includes:
- Common
- Defined in:
- lib/lib/reader.rb
Instance Method Summary collapse
-
#initialize(input = $stdin, options = {}) {|reader| ... } ⇒ Reader
constructor
A new instance of Reader.
Methods included from Common
#distinct?, #each_statement, #each_target, #each_triple, #each_variable, #reduced?, #statements, #targets, #triples, #type, #variables
Constructor Details
#initialize(input = $stdin, options = {}) {|reader| ... } ⇒ Reader
Returns a new instance of Reader.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/lib/reader.rb', line 12 def initialize(input = $stdin, = {}, &block) @line = input.respond_to?(:read) ? input.read : input @graph = RDF::Graph.new @type = nil @prefixes = {} @variables = {} @targets = [] @options = {} read_query block.call(self) if block_given? end |