Class: Fathom::Concept
- Inherits:
-
Object
- Object
- Fathom::Concept
- Includes:
- RDF, Spira::Resource
- Defined in:
- lib/fathom/archive/concept.rb
Class Method Summary collapse
Class Method Details
.find_or_build(name, description = nil) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/fathom/archive/concept.rb', line 46 def find_or_build(name, description=nil) concept = Concept.for(concept_name(name)) return concept if concept.exist? concept.name = name concept.description = description concept end |
.find_or_create(name, description = nil) ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/fathom/archive/concept.rb', line 54 def find_or_create(name, description=nil) concept = Concept.for(concept_name(name)) return concept if concept.exist? concept.name = name concept.description = description concept.save! concept end |