Class: Triple

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#objectObject

Returns the value of attribute object.



26
27
28
# File 'lib/pomegranate/rdfs_rulebook.rb', line 26

def object
  @object
end

#predicateObject

Returns the value of attribute predicate.



25
26
27
# File 'lib/pomegranate/rdfs_rulebook.rb', line 25

def predicate
  @predicate
end

#subjectObject

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