Class: AWSCDK::TimeConversionOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::TimeConversionOptions
- Defined in:
- time_conversion_options.rb
Overview
Options for how to convert time to a different unit.
Instance Attribute Summary collapse
-
#integral ⇒ Boolean?
readonly
If
true, conversions into a larger time unit (e.g.SecondstoMinutes) will fail if the result is not an integer.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(integral: nil) ⇒ TimeConversionOptions
constructor
A new instance of TimeConversionOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(integral: nil) ⇒ TimeConversionOptions
Returns a new instance of TimeConversionOptions.
8 9 10 11 |
# File 'time_conversion_options.rb', line 8 def initialize(integral: nil) @integral = integral Jsii::Type.check_type(@integral, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "integral") unless @integral.nil? end |
Instance Attribute Details
#integral ⇒ Boolean? (readonly)
Note:
Default: true
If true, conversions into a larger time unit (e.g. Seconds to Minutes) will fail if the result is not an integer.
17 18 19 |
# File 'time_conversion_options.rb', line 17 def integral @integral end |
Class Method Details
.jsii_properties ⇒ Object
19 20 21 22 23 |
# File 'time_conversion_options.rb', line 19 def self.jsii_properties { :integral => "integral", } end |
Instance Method Details
#to_jsii ⇒ Object
25 26 27 28 29 30 31 |
# File 'time_conversion_options.rb', line 25 def to_jsii result = {} result.merge!({ "integral" => @integral, }) result.compact end |