Sha256: 24f9468134854853ef068cc634fb5d6ee7c510fd382cbe3ac53c4b4accdac73d
Contents?: true
Size: 775 Bytes
Versions: 2
Compression:
Stored size: 775 Bytes
Contents
module BioInterchange::TextMining class Document # Creates a blank document representation. # # +uri+:: source of the document def initialize(uri) @uri = uri # Will hold content: @content = [] end # Returns the URI of the document. def uri @uri end # Adds content to the document. # # +content+:: content of type +BioInterchange::TextMining::Content+ that should be added to the document def add(content) raise BioInterchange::Exceptions::ImplementationModelError, 'Content has to be of kind BioInterchange::TextMining::Content' unless content.kind_of?(BioInterchange::TextMining::Content) @content << content end # Returns the document contents as an array. def contents @content.clone.freeze end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
biointerchange-0.1.2 | lib/biointerchange/textmining/document.rb |
biointerchange-0.1.0 | lib/biointerchange/textmining/document.rb |