Sha256: 8fb75776d63df6ee6777a50fa5fe32f918ab609f0d0520d6be6349f4cee6cff4

Contents?: true

Size: 794 Bytes

Versions: 6

Compression:

Stored size: 794 Bytes

Contents

#!/usr/bin/env ruby -w
# encoding: UTF-8
#
# = FitDataRecord.rb -- Fit4Ruby - FIT file processing library for Ruby
#
# Copyright (c) 2020 by Chris Schlaeger <cs@taskjuggler.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#

module Fit4Ruby

  # Some FIT message field names conflict with BinData reserved names. We use
  # this translation method to map the conflicting names to BinData compatible
  # names.
  module BDFieldNameTranslator

    BD_DICT =  {
      'array' => '_array',
      'type' => '_type'
    }

    def to_bd_field_name(name)
      if (bd_name = BD_DICT[name])
        return bd_name
      end

      name
    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fit4ruby-3.13.0 lib/fit4ruby/BDFieldNameTranslator.rb
fit4ruby-3.12.0 lib/fit4ruby/BDFieldNameTranslator.rb
fit4ruby-3.11.0 lib/fit4ruby/BDFieldNameTranslator.rb
fit4ruby-3.10.0 lib/fit4ruby/BDFieldNameTranslator.rb
fit4ruby-3.9.0 lib/fit4ruby/BDFieldNameTranslator.rb
fit4ruby-3.8.0 lib/fit4ruby/BDFieldNameTranslator.rb