Class: AWSCDK::SizeConversionOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SizeConversionOptions
- Defined in:
- size_conversion_options.rb
Overview
Options for how to convert time to a different unit.
Instance Attribute Summary collapse
-
#rounding ⇒ AWSCDK::SizeRoundingBehavior?
readonly
How conversions should behave when it encounters a non-integer result.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rounding: nil) ⇒ SizeConversionOptions
constructor
A new instance of SizeConversionOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(rounding: nil) ⇒ SizeConversionOptions
Returns a new instance of SizeConversionOptions.
8 9 10 11 |
# File 'size_conversion_options.rb', line 8 def initialize(rounding: nil) @rounding = rounding Jsii::Type.check_type(@rounding, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplUm91bmRpbmdCZWhhdmlvciJ9")), "rounding") unless @rounding.nil? end |
Instance Attribute Details
#rounding ⇒ AWSCDK::SizeRoundingBehavior? (readonly)
Note:
Default: SizeRoundingBehavior.FAIL
How conversions should behave when it encounters a non-integer result.
17 18 19 |
# File 'size_conversion_options.rb', line 17 def rounding @rounding end |
Class Method Details
.jsii_properties ⇒ Object
19 20 21 22 23 |
# File 'size_conversion_options.rb', line 19 def self.jsii_properties { :rounding => "rounding", } end |
Instance Method Details
#to_jsii ⇒ Object
25 26 27 28 29 30 31 |
# File 'size_conversion_options.rb', line 25 def to_jsii result = {} result.merge!({ "rounding" => @rounding, }) result.compact end |