Class: AxlsxEnhanced::Helpers::Styles::Style
- Inherits:
-
Object
- Object
- AxlsxEnhanced::Helpers::Styles::Style
- Defined in:
- lib/axlsx_enhanced/helpers/styles/style.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
Returns the value of attribute properties.
Instance Method Summary collapse
- #add_property(hash) ⇒ Object
-
#initialize(args = {}) ⇒ Style
constructor
A new instance of Style.
- #name ⇒ Object
- #name=(value) ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Style
Returns a new instance of Style.
7 8 9 10 |
# File 'lib/axlsx_enhanced/helpers/styles/style.rb', line 7 def initialize(args = {}) self.name = args[:name] self.properties = args[:properties] end |
Instance Attribute Details
#properties ⇒ Object
Returns the value of attribute properties.
5 6 7 |
# File 'lib/axlsx_enhanced/helpers/styles/style.rb', line 5 def properties @properties end |
Instance Method Details
#add_property(hash) ⇒ Object
20 21 22 |
# File 'lib/axlsx_enhanced/helpers/styles/style.rb', line 20 def add_property(hash) self.properties.deep_merge! hash end |
#name ⇒ Object
16 17 18 |
# File 'lib/axlsx_enhanced/helpers/styles/style.rb', line 16 def name return @name end |
#name=(value) ⇒ Object
12 13 14 |
# File 'lib/axlsx_enhanced/helpers/styles/style.rb', line 12 def name=(value) @name = value.to_sym end |