Copyright 2011 innoQ Deutschland GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| VERSION | = | "0.1.16" |
A shortcut so be able to define Subjects and Objects without specifing a namespace. When no namespace is given, Default will be used.
Example:
IqRdf::sub.pred(IqRdf::obj) # => :sub :pred :obj.
Copyright 2011 innoQ Deutschland GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This evals the given block in the context of IqRdF. You can use this to be able to omit the "IqRdf::" in your turtle statements.
Example:
IqRdf::use do
mySubject Rdf::type Skos::Concept # => mySubject rdf:type skos:Concept
end
But: There is an inconsistency in Ruby 1.8 and JRuby <= 1.4 (even with —1.9):
module M; end
M.module_eval {C = 1; self::D = 1}
p defined? M::C # => nil (should be "constant" (and is in C Ruby 1.9))
p defined? M::D # => "constant"
This means, that use will only work with Ruby 1.9. Feel free to change this if you know another way then module_eval to achieve this.