Class: Google::Apis::HealthV4::BodyFat
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::BodyFat
- 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
Body fat measurement.
Instance Attribute Summary collapse
-
#percentage ⇒ Float
Required.
-
#sample_time ⇒ Google::Apis::HealthV4::ObservationSampleTime
Represents a sample time of an observed data point.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BodyFat
constructor
A new instance of BodyFat.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BodyFat
Returns a new instance of BodyFat.
404 405 406 |
# File 'lib/google/apis/health_v4/classes.rb', line 404 def initialize(**args) update!(**args) end |
Instance Attribute Details
#percentage ⇒ Float
Required. Body fat percentage, in range [0, 100].
Corresponds to the JSON property percentage
397 398 399 |
# File 'lib/google/apis/health_v4/classes.rb', line 397 def percentage @percentage end |
#sample_time ⇒ Google::Apis::HealthV4::ObservationSampleTime
Represents a sample time of an observed data point.
Corresponds to the JSON property sampleTime
402 403 404 |
# File 'lib/google/apis/health_v4/classes.rb', line 402 def sample_time @sample_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
409 410 411 412 |
# File 'lib/google/apis/health_v4/classes.rb', line 409 def update!(**args) @percentage = args[:percentage] if args.key?(:percentage) @sample_time = args[:sample_time] if args.key?(:sample_time) end |