Method: Bio::EMBL#dt
- Defined in:
- lib/bio/db/embl/embl.rb
#dt(key = nil) ⇒ Object
returns contents in the date (DT) line.
-
Bio::EMBL#dt -> <DT Hash>
where <DT Hash> is:
{}
-
Bio::EMBL#dt(key) -> String
keys: ‘created’ and ‘updated’
DT Line; date (2/entry)
182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/bio/db/embl/embl.rb', line 182 def dt(key=nil) unless @data['DT'] tmp = Hash.new dt_line = self.get('DT').split(/\n/) tmp['created'] = dt_line[0].sub(/\w{2} /,'').strip tmp['updated'] = dt_line[1].sub(/\w{2} /,'').strip @data['DT'] = tmp end if key @data['DT'][key] else @data['DT'] end end |