Class: LockstepSdk::ViewBoxSettingsModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/view_box_settings_model.rb

Overview

Optional meta data for image view box settings.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ViewBoxSettingsModel

Initialize the ViewBoxSettingsModel using the provided prototype



25
26
27
28
29
30
# File 'lib/lockstep_sdk/models/view_box_settings_model.rb', line 25

def initialize(params = {})
    @logo_view_box_min_x = params.dig(:logo_view_box_min_x)
    @logo_view_box_min_y = params.dig(:logo_view_box_min_y)
    @logo_view_box_width = params.dig(:logo_view_box_width)
    @logo_view_box_height = params.dig(:logo_view_box_height)
end

Instance Attribute Details

#logo_view_box_heightDouble

Returns ViewBox height setting for this Company’s logo.

Returns:

  • (Double)

    ViewBox height setting for this Company’s logo.



46
47
48
# File 'lib/lockstep_sdk/models/view_box_settings_model.rb', line 46

def logo_view_box_height
  @logo_view_box_height
end

#logo_view_box_min_xDouble

Returns ViewBox minX setting for this Company’s logo.

Returns:

  • (Double)

    ViewBox minX setting for this Company’s logo.



34
35
36
# File 'lib/lockstep_sdk/models/view_box_settings_model.rb', line 34

def logo_view_box_min_x
  @logo_view_box_min_x
end

#logo_view_box_min_yDouble

Returns ViewBox minY setting for this Company’s logo.

Returns:

  • (Double)

    ViewBox minY setting for this Company’s logo.



38
39
40
# File 'lib/lockstep_sdk/models/view_box_settings_model.rb', line 38

def logo_view_box_min_y
  @logo_view_box_min_y
end

#logo_view_box_widthDouble

Returns ViewBox width setting for this Company’s logo.

Returns:

  • (Double)

    ViewBox width setting for this Company’s logo.



42
43
44
# File 'lib/lockstep_sdk/models/view_box_settings_model.rb', line 42

def logo_view_box_width
  @logo_view_box_width
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



50
51
52
53
54
55
56
57
# File 'lib/lockstep_sdk/models/view_box_settings_model.rb', line 50

def as_json(options={})
    {
        'logoViewBoxMinX' => @logo_view_box_min_x,
        'logoViewBoxMinY' => @logo_view_box_min_y,
        'logoViewBoxWidth' => @logo_view_box_width,
        'logoViewBoxHeight' => @logo_view_box_height,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



61
62
63
# File 'lib/lockstep_sdk/models/view_box_settings_model.rb', line 61

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end