Class: OwlNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/environment.rb

Overview

OWL Namespaces

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#uriObject

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

#typeObject

for RDF.type



66
67
68
# File 'lib/environment.rb', line 66

def type # for RDF.type
  "#{@uri}type"
end