Class: StylesGroup
- Inherits:
-
Object
- Object
- StylesGroup
- Defined in:
- lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/styles_group.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#styles ⇒ Object
Returns the value of attribute styles.
Instance Method Summary collapse
-
#initialize(name:, styles:) ⇒ StylesGroup
constructor
A new instance of StylesGroup.
- #is_dark ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(name:, styles:) ⇒ StylesGroup
Returns a new instance of StylesGroup.
6 7 8 9 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/styles_group.rb', line 6 def initialize(name:, styles:) @name = name @styles = styles end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/styles_group.rb', line 4 def name @name end |
#styles ⇒ Object
Returns the value of attribute styles.
4 5 6 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/styles_group.rb', line 4 def styles @styles end |
Instance Method Details
#is_dark ⇒ Object
11 12 13 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/styles_group.rb', line 11 def is_dark name.downcase.include?('dark') || false end |
#to_hash ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/admiral-tools-figma/helper/figma/figma_client/models/domain/primitives/styles_group.rb', line 15 def to_hash hash = {} hash['name'] = name hash['styles'] = styles&.map { |s| s.to_hash } hash['is_dark'] = is_dark hash end |