Class: AxlsxEnhanced::Helpers::Styles::Style

Inherits:
Object
  • Object
show all
Defined in:
lib/axlsx_enhanced/helpers/styles/style.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#propertiesObject

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

#nameObject



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