Class: FrameInfo
- Inherits:
-
Object
- Object
- FrameInfo
- Defined in:
- lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb
Instance Attribute Summary collapse
-
#background_color ⇒ Object
Returns the value of attribute background_color.
-
#name ⇒ Object
Returns the value of attribute name.
-
#node_id ⇒ Object
Returns the value of attribute node_id.
-
#page_id ⇒ Object
Returns the value of attribute page_id.
-
#page_name ⇒ Object
Returns the value of attribute page_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(node_id:, name:, background_color:, page_id:, page_name:) ⇒ FrameInfo
constructor
A new instance of FrameInfo.
- #to_hash ⇒ Object
Constructor Details
#initialize(node_id:, name:, background_color:, page_id:, page_name:) ⇒ FrameInfo
Returns a new instance of FrameInfo.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb', line 11 def initialize( node_id:, name:, background_color:, page_id:, page_name: ) @node_id = node_id @name = name @background_color = background_color @page_id = page_id @page_name = page_name end |
Instance Attribute Details
#background_color ⇒ Object
Returns the value of attribute background_color.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb', line 4 def background_color @background_color end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb', line 4 def name @name end |
#node_id ⇒ Object
Returns the value of attribute node_id.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb', line 4 def node_id @node_id end |
#page_id ⇒ Object
Returns the value of attribute page_id.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb', line 4 def page_id @page_id end |
#page_name ⇒ Object
Returns the value of attribute page_name.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb', line 4 def page_name @page_name end |
Class Method Details
.from_hash(hash) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb', line 25 def self.from_hash(hash) return nil if hash.nil? node_id = hash['node_id'] name = hash['name'] background_color = hash['background_color'] page_id = hash['page_id'] page_name = hash['page_name'] FigmaFrameInfo.new(node_id: node_id, name: name, background_color: background_color, page_id: page_id, page_name: page_name) end |
Instance Method Details
#to_hash ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/frame_info.rb', line 37 def to_hash hash = {} hash['node_id'] = node_id hash['name'] = name hash['background_color'] = background_color hash['page_id'] = page_id hash['page_name'] = page_name hash end |