Class: GO::Ontology
Constant Summary
Constants included from GermDefault
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
Returns the value of attribute header.
Instance Method Summary collapse
- #find(pattern) ⇒ Object
-
#initialize(file) ⇒ Ontology
constructor
A new instance of Ontology.
- #inspect ⇒ Object
- #term(id) ⇒ Object
Methods included from GermDefault
cache, cache_load, default, has_default, method_missing
Constructor Details
Instance Attribute Details
#header ⇒ Object (readonly)
Returns the value of attribute header.
73 74 75 |
# File 'lib/go.rb', line 73 def header @header end |
Instance Method Details
#find(pattern) ⇒ Object
89 90 91 92 93 |
# File 'lib/go.rb', line 89 def find pattern @terms.select do |id,term| term.name =~ pattern end.values end |
#inspect ⇒ Object
81 82 83 |
# File 'lib/go.rb', line 81 def inspect "#<#{self.class.name}:#{object_id} @terms=#{@terms.count}>" end |
#term(id) ⇒ Object
85 86 87 |
# File 'lib/go.rb', line 85 def term id @terms[id] end |