Class: Google::Apis::HealthV4::ActiveEnergyBurned

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

Energy burned as part of an activity, excluding the basal energy burn.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ActiveEnergyBurned

Returns a new instance of ActiveEnergyBurned.



39
40
41
# File 'lib/google/apis/health_v4/classes.rb', line 39

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

Instance Attribute Details

#intervalGoogle::Apis::HealthV4::ObservationTimeInterval

Represents a time interval of an observed data point. Corresponds to the JSON property interval



32
33
34
# File 'lib/google/apis/health_v4/classes.rb', line 32

def interval
  @interval
end

#kcalFloat

Required. Energy burned during an activity, measured in kilocalories. Corresponds to the JSON property kcal

Returns:

  • (Float)


37
38
39
# File 'lib/google/apis/health_v4/classes.rb', line 37

def kcal
  @kcal
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



44
45
46
47
# File 'lib/google/apis/health_v4/classes.rb', line 44

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