Class: Triple
- Inherits:
-
Object
- Object
- Triple
- Defined in:
- lib/pomegranate/rdfs_rulebook.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
-
#predicate ⇒ Object
Returns the value of attribute predicate.
-
#subject ⇒ Object
Returns the value of attribute subject.
Instance Method Summary collapse
- #==(obj) ⇒ Object
-
#initialize(subject, predicate, object) ⇒ Triple
constructor
A new instance of Triple.
Constructor Details
#initialize(subject, predicate, object) ⇒ Triple
Returns a new instance of Triple.
19 20 21 22 23 |
# File 'lib/pomegranate/rdfs_rulebook.rb', line 19 def initialize(subject,predicate,object) @subject = subject @predicate = predicate @object= object end |
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object.
26 27 28 |
# File 'lib/pomegranate/rdfs_rulebook.rb', line 26 def object @object end |
#predicate ⇒ Object
Returns the value of attribute predicate.
25 26 27 |
# File 'lib/pomegranate/rdfs_rulebook.rb', line 25 def predicate @predicate end |
#subject ⇒ Object
Returns the value of attribute subject.
24 25 26 |
# File 'lib/pomegranate/rdfs_rulebook.rb', line 24 def subject @subject end |
Instance Method Details
#==(obj) ⇒ Object
28 29 30 |
# File 'lib/pomegranate/rdfs_rulebook.rb', line 28 def ==(obj) (@subject == obj.subject) && (@object == obj.object) && (@predicate == obj.predicate) end |