Class: AWSCDK::CloudWatch::Spacer
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudWatch::Spacer
- Includes:
- IWidget
- Defined in:
- cloud_watch/spacer.rb
Overview
A widget that doesn't display anything but takes up space.
Class Method Summary collapse
Instance Method Summary collapse
-
#height ⇒ Numeric
The amount of vertical grid units the widget will take up.
-
#initialize(props = nil) ⇒ Spacer
constructor
A new instance of Spacer.
-
#position(_x, _y) ⇒ void
Place the widget at a given position.
-
#to_json ⇒ Array<Object>
Return the widget JSON for use in the dashboard.
-
#width ⇒ Numeric
The amount of horizontal grid units the widget will take up.
Constructor Details
#initialize(props = nil) ⇒ Spacer
Returns a new instance of Spacer.
10 11 12 13 14 |
# File 'cloud_watch/spacer.rb', line 10 def initialize(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::SpacerProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5TcGFjZXJQcm9wcyJ9")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'cloud_watch/spacer.rb', line 16 def self.jsii_overridable_methods { :height => { kind: :property, name: "height", is_optional: false }, :width => { kind: :property, name: "width", is_optional: false }, :position => { kind: :method, name: "position", is_optional: false }, :to_json => { kind: :method, name: "toJson", is_optional: false }, } end |
Instance Method Details
#height ⇒ Numeric
The amount of vertical grid units the widget will take up.
28 29 30 |
# File 'cloud_watch/spacer.rb', line 28 def height() jsii_get_property("height") end |
#position(_x, _y) ⇒ void
This method returns an undefined value.
Place the widget at a given position.
44 45 46 47 48 |
# File 'cloud_watch/spacer.rb', line 44 def position(_x, _y) Jsii::Type.check_type(_x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "_x") Jsii::Type.check_type(_y, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "_y") jsii_call_method("position", [_x, _y]) end |
#to_json ⇒ Array<Object>
Return the widget JSON for use in the dashboard.
53 54 55 |
# File 'cloud_watch/spacer.rb', line 53 def to_json() jsii_call_method("toJson", []) end |
#width ⇒ Numeric
The amount of horizontal grid units the widget will take up.
35 36 37 |
# File 'cloud_watch/spacer.rb', line 35 def width() jsii_get_property("width") end |