More Ruby Meets the Semantic Web

Doing a bit more research on Ruby and the Semantic Web, I found another blog entry from Obie titled Semantic Web, meet Ruby on Rails.

Here's one of his snippets:



class Person < ActiveOntology::Base

definition "http://xmlns.com/foaf/0.1/index.rdf"

def your_method_here
# methods are pretty much the only thing left to write
# because since you defined it as a foaf:Person, it already has
# all the properties described at http://xmlns.com/foaf/0.1/#term_Person
end

def network_msg
"#{firstName} #{surname} has #{knows.size} people in their network"
end

end

Popular posts from this blog

The 29 Healthiest Foods on the Planet

Lists and arrays in Dart

Converting Array to List in Scala