Method: Axlsx::PatternFill#initialize

Defined in:
lib/axlsx/stylesheet/pattern_fill.rb

#initialize(options = {}) ⇒ PatternFill

Creates a new PatternFill Object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • patternType (Symbol)
  • fgColor (Color)
  • bgColor (Color)


45
46
47
48
49
50
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 45

def initialize(options={})
  @patternType = :none
  options.each do |o|
    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
  end
end