Class: Io::Flow::V0::Models::InlineWindowViewportSize
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::InlineWindowViewportSize
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of InlineWindowViewportSize for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of InlineWindowViewportSize for this value, or nil if not found.
-
.fullscreen ⇒ Object
Full Screen.
-
.responsive ⇒ Object
Responsive layout, fits into whatever size the container is.
-
.small ⇒ Object
600x400.
-
.x_small ⇒ Object
500x600.
-
.xx_small ⇒ Object
390x400.
-
.xxx_small ⇒ Object
250x400.
Instance Method Summary collapse
-
#initialize(value) ⇒ InlineWindowViewportSize
constructor
A new instance of InlineWindowViewportSize.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ InlineWindowViewportSize
Returns a new instance of InlineWindowViewportSize.
19238 19239 19240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19238 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19236 19237 19238 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19236 def value @value end |
Class Method Details
.ALL ⇒ Object
19258 19259 19260 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19258 def InlineWindowViewportSize.ALL @@all ||= [InlineWindowViewportSize.xxx_small, InlineWindowViewportSize.xx_small, InlineWindowViewportSize.x_small, InlineWindowViewportSize.small, InlineWindowViewportSize.fullscreen, InlineWindowViewportSize.responsive] end |
.apply(value) ⇒ Object
Returns the instance of InlineWindowViewportSize for this value, creating a new instance for an unknown value
19243 19244 19245 19246 19247 19248 19249 19250 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19243 def InlineWindowViewportSize.apply(value) if value.instance_of?(InlineWindowViewportSize) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || InlineWindowViewportSize.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of InlineWindowViewportSize for this value, or nil if not found
19253 19254 19255 19256 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19253 def InlineWindowViewportSize.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) InlineWindowViewportSize.ALL.find { |v| v.value == value } end |
.fullscreen ⇒ Object
Full Screen.
19283 19284 19285 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19283 def InlineWindowViewportSize.fullscreen @@_fullscreen ||= InlineWindowViewportSize.new('fullscreen') end |
.responsive ⇒ Object
Responsive layout, fits into whatever size the container is.
19288 19289 19290 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19288 def InlineWindowViewportSize.responsive @@_responsive ||= InlineWindowViewportSize.new('responsive') end |
.small ⇒ Object
600x400
19278 19279 19280 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19278 def InlineWindowViewportSize.small @@_small ||= InlineWindowViewportSize.new('small') end |
.x_small ⇒ Object
500x600
19273 19274 19275 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19273 def InlineWindowViewportSize.x_small @@_x_small ||= InlineWindowViewportSize.new('x_small') end |
.xx_small ⇒ Object
390x400
19268 19269 19270 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19268 def InlineWindowViewportSize.xx_small @@_xx_small ||= InlineWindowViewportSize.new('xx_small') end |
.xxx_small ⇒ Object
250x400
19263 19264 19265 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19263 def InlineWindowViewportSize.xxx_small @@_xxx_small ||= InlineWindowViewportSize.new('xxx_small') end |
Instance Method Details
#to_hash ⇒ Object
19292 19293 19294 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19292 def to_hash value end |