Module: Extensions::HL7::Segments::SFT::ClassMethods

Defined in:
lib/core_ext/segments/sft.rb

Instance Method Summary collapse

Instance Method Details

#index_for(field_name) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/core_ext/segments/sft.rb', line 18

def index_for(field_name)
  index = self.fields.collect {|field| field[0]}.index(field_name) rescue -1
  if index < 0
    return -1
  else
    return index 
  end
end