Class: OwlNamespace
- Inherits:
-
Object
- Object
- OwlNamespace
- Defined in:
- lib/environment.rb
Overview
OWL Namespaces
Instance Attribute Summary collapse
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
- #[](property) ⇒ Object
-
#initialize(uri) ⇒ OwlNamespace
constructor
A new instance of OwlNamespace.
- #method_missing(property) ⇒ Object
-
#type ⇒ Object
for RDF.type.
Constructor Details
#initialize(uri) ⇒ OwlNamespace
Returns a new instance of OwlNamespace.
58 59 60 |
# File 'lib/environment.rb', line 58 def initialize(uri) @uri = uri end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(property) ⇒ Object
70 71 72 |
# File 'lib/environment.rb', line 70 def method_missing(property) @uri+property.to_s end |
Instance Attribute Details
#uri ⇒ Object
Returns the value of attribute uri.
57 58 59 |
# File 'lib/environment.rb', line 57 def uri @uri end |
Instance Method Details
#[](property) ⇒ Object
62 63 64 |
# File 'lib/environment.rb', line 62 def [](property) @uri+property.to_s end |
#type ⇒ Object
for RDF.type
66 67 68 |
# File 'lib/environment.rb', line 66 def type # for RDF.type "#{@uri}type" end |