Method: Tripod::SparqlQuery#initialize
- Defined in:
- lib/tripod/sparql_query.rb
#initialize(query_string, interpolations = nil) ⇒ SparqlQuery
Returns a new instance of SparqlQuery.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/tripod/sparql_query.rb', line 18 def initialize(query_string, interpolations=nil) query_string.strip! @query = interpolate_query(query_string, interpolations) if interpolations @query ||= query_string if self.has_prefixes? @prefixes, @body = self.extract_prefixes else @body = self.query end @query_type = get_query_type end |