This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CDs < RDF::Vocabulary('http://example.org/') | |
property :artist | |
property :cds | |
property :artists | |
end | |
class CD | |
include Spira::Resource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spira' | |
require 'rdf' | |
Spira.add_repository(:person, ::RDF::Repository) | |
class Person | |
include Spira::Resource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'quantity/all' | |
1.meter #=> 1 meter | |
1.meter.to_feet #=> 3.28083... foot | |
c = 299792458.meters / 1.second #=> 299792458 meter/second | |
newton = 1.meter * 1.kilogram / 1.second**2 #=> 1 meter*kilogram/second^2 | |
newton.to_feet #=> 3.28083989501312 foot*kilogram/second^2 | |
newton.convert(:feet) #=> 3.28083989501312 foot*kilogram/second^2 | |
jerk_newton / 1.second #=> 1 meter*kilogram/second^3 | |
jerk_newton * 1.second == newton #=> true |
NewerOlder