Class: Google::Apis::ManufacturersV1::FloatUnit
- Inherits:
-
Object
- Object
- Google::Apis::ManufacturersV1::FloatUnit
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/manufacturers_v1/classes.rb,
lib/google/apis/manufacturers_v1/representations.rb,
lib/google/apis/manufacturers_v1/representations.rb
Overview
Combination of float amout and unit.
Instance Attribute Summary collapse
-
#amount ⇒ Float
amount.
-
#unit ⇒ String
unit.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FloatUnit
constructor
A new instance of FloatUnit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ FloatUnit
Returns a new instance of FloatUnit.
450 451 452 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 450 def initialize(**args) update!(**args) end |
Instance Attribute Details
#amount ⇒ Float
amount.
Corresponds to the JSON property amount
443 444 445 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 443 def amount @amount end |
#unit ⇒ String
unit.
Corresponds to the JSON property unit
448 449 450 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 448 def unit @unit end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
455 456 457 458 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 455 def update!(**args) @amount = args[:amount] if args.key?(:amount) @unit = args[:unit] if args.key?(:unit) end |