Sha256: 8b369030552696c54dc9fa2b7e8d14e23e314116eb6a460b0e6ce8eb3d522a9d

Contents?: true

Size: 637 Bytes

Versions: 43

Compression:

Stored size: 637 Bytes

Contents

module Extensions
  module HL7
    module Segments
      module SFT

        def self.included base
          base.send :include, InstanceMethods
          base.extend ClassMethods
        end
        
        module InstanceMethods
          def to_hash
            @hash = {}
          end
        end
        
        module ClassMethods
          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
        end
        
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
ruby-hl7-extensions-0.4.8 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.4.7 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.4.6 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.4.5 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.4.4 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.4.3 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.4.2 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.4.1 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.4.0 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.3.6 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.3.4 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.3.3 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.3.2 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.3.1 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.2.2 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.2.1 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.2.0 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.1.9 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.1.8 lib/core_ext/segments/sft.rb
ruby-hl7-extensions-0.1.7 lib/core_ext/segments/sft.rb