Class: ImageLink
- Inherits:
-
Object
- Object
- ImageLink
- Defined in:
- lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/image_link.rb
Instance Attribute Summary collapse
-
#image_format ⇒ Object
Returns the value of attribute image_format.
-
#link ⇒ Object
Returns the value of attribute link.
-
#scale ⇒ Object
Returns the value of attribute scale.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(link:, scale:, image_format:) ⇒ ImageLink
constructor
A new instance of ImageLink.
- #to_hash ⇒ Object
Constructor Details
#initialize(link:, scale:, image_format:) ⇒ ImageLink
Returns a new instance of ImageLink.
6 7 8 9 10 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/image_link.rb', line 6 def initialize(link:, scale:, image_format:) @link = link @scale = scale @image_format = image_format end |
Instance Attribute Details
#image_format ⇒ Object
Returns the value of attribute image_format.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/image_link.rb', line 4 def image_format @image_format end |
#link ⇒ Object
Returns the value of attribute link.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/image_link.rb', line 4 def link @link end |
#scale ⇒ Object
Returns the value of attribute scale.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/image_link.rb', line 4 def scale @scale end |
Class Method Details
.from_hash(hash) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/image_link.rb', line 12 def self.from_hash(hash) return nil if hash.nil? scale = hash['scale'] link = hash['link'] image_format = hash['image_format'] if !scale.nil? && !link.nil? && !image_format.nil? return ImageLink.new(scale: scale, link: link, image_format: image_format) end nil end |
Instance Method Details
#to_hash ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/image_link.rb', line 26 def to_hash hash = {} hash['scale'] = scale hash['link'] = link hash['image_format'] = image_format hash end |