Class: Google::Apis::HealthV4::FoodMeasurementUnit

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/health_v4/classes.rb,
lib/google/apis/health_v4/representations.rb,
lib/google/apis/health_v4/representations.rb

Overview

Represents a food measurement unit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FoodMeasurementUnit

Returns a new instance of FoodMeasurementUnit.



2507
2508
2509
# File 'lib/google/apis/health_v4/classes.rb', line 2507

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#display_nameString

Required. The display name of the food measurement unit (e.g., "gram", "piece") . Corresponds to the JSON property displayName

Returns:

  • (String)


2499
2500
2501
# File 'lib/google/apis/health_v4/classes.rb', line 2499

def display_name
  @display_name
end

#plural_display_nameString

Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces"). Corresponds to the JSON property pluralDisplayName

Returns:

  • (String)


2505
2506
2507
# File 'lib/google/apis/health_v4/classes.rb', line 2505

def plural_display_name
  @plural_display_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2512
2513
2514
2515
# File 'lib/google/apis/health_v4/classes.rb', line 2512

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @plural_display_name = args[:plural_display_name] if args.key?(:plural_display_name)
end