Method: Axlsx::VmlShape#initialize

Defined in:
lib/axlsx/drawing/vml_shape.rb

#initialize(options = {}) {|_self| ... } ⇒ VmlShape

Creates a new VmlShape

Parameters:

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

    a customizable set of options

Options Hash (options):

  • left_column (Integer|String)
  • left_offset (Integer|String)
  • top_row (Integer|String)
  • top_offset (Integer|String)
  • right_column (Integer|String)
  • right_offset (Integer|String)
  • bottom_row (Integer|String)
  • bottom_offset (Integer|String)

Yields:

  • (_self)

Yield Parameters:



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/axlsx/drawing/vml_shape.rb', line 55

def initialize(options={})
  @row = @column = @left_column = @top_row = @right_column = @bottom_row = 0
  @left_offset = 15
  @top_offset = 2
  @right_offset = 50
  @bottom_offset = 5
  @id = (0...8).map{65.+(rand(25)).chr}.join
  options.each do |o|
    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
  end
  yield self if block_given?
end