Class: Embulk::Input::HealthplanetApi::Column
- Inherits:
-
Object
- Object
- Embulk::Input::HealthplanetApi::Column
- Defined in:
- lib/embulk/input/healthplanet_api/column.rb
Instance Method Summary collapse
-
#initialize(lang) ⇒ Column
constructor
A new instance of Column.
- #name(key) ⇒ Object
Constructor Details
#initialize(lang) ⇒ Column
Returns a new instance of Column.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/embulk/input/healthplanet_api/column.rb', line 8 def initialize(lang) case lang.downcase when 'ja', 'japanese' @names = { :time => '測定日時', :model => 'モデル', :weight => '体重', :body_fat => '体脂肪率', :muscle_mass => '筋肉量', :muscle_score => '筋肉スコア', :visceral_fat2 => '内臓脂肪レベル2', :visceral_fat1 => '内臓脂肪レベル1', :metabolic_rate => '基礎代謝量', :metabolic_age => '体内年齢', :bone_mass => '推定骨量', } when 'en', 'english' @names = { :time => 'time', :model => 'model', :weight => 'weight', :body_fat => 'body fat %', :muscle_mass => 'muscle mass', :muscle_score => 'muscle score', :visceral_fat2 => 'visceral fat level 2', :visceral_fat1 => 'visceral fat level 1', :metabolic_rate => 'basal metabolic rate', :metabolic_age => 'metabolic age', :bone_mass => 'estimated bone mass', } else # returns as-is API tag @names = { :time => 'time', :model => 'model', :weight => '6021', :body_fat => '6022', :muscle_mass => '6023', :muscle_score => '6024', :visceral_fat2 => '6025', :visceral_fat1 => '6026', :metabolic_rate => '6027', :metabolic_age => '6028', :bone_mass => '6029', } end end |
Instance Method Details
#name(key) ⇒ Object
56 57 58 |
# File 'lib/embulk/input/healthplanet_api/column.rb', line 56 def name(key) @names[key] end |