Class: Writexlsx::Worksheet::AssetManager

Inherits:
Object
  • Object
show all
Defined in:
lib/write_xlsx/worksheet/asset_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAssetManager

Returns a new instance of AssetManager.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 11

def initialize
  @charts = []
  @images = []
  @tables = []
  @sparklines = []
  @shapes = []

  @header_images = []
  @footer_images = []
  @background_image = nil
end

Instance Attribute Details

#background_imageObject

Returns the value of attribute background_image.



8
9
10
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 8

def background_image
  @background_image
end

#chartsObject (readonly)

Returns the value of attribute charts.



7
8
9
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 7

def charts
  @charts
end

Returns the value of attribute footer_images.



9
10
11
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 9

def footer_images
  @footer_images
end

#header_imagesObject (readonly)

Returns the value of attribute header_images.



9
10
11
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 9

def header_images
  @header_images
end

#imagesObject (readonly)

Returns the value of attribute images.



7
8
9
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 7

def images
  @images
end

#shapesObject (readonly)

Returns the value of attribute shapes.



7
8
9
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 7

def shapes
  @shapes
end

#sparklinesObject (readonly)

Returns the value of attribute sparklines.



7
8
9
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 7

def sparklines
  @sparklines
end

#tablesObject (readonly)

Returns the value of attribute tables.



7
8
9
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 7

def tables
  @tables
end

Instance Method Details

#add_chart(chart) ⇒ Object



23
24
25
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 23

def add_chart(chart)
  @charts << chart
end


55
56
57
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 55

def add_footer_image(image)
  @footer_images << image
end

#add_header_image(image) ⇒ Object



51
52
53
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 51

def add_header_image(image)
  @header_images << image
end

#add_image(image) ⇒ Object



27
28
29
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 27

def add_image(image)
  @images << image
end

#add_shape(shape) ⇒ Object



39
40
41
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 39

def add_shape(shape)
  @shapes << shape
end

#add_sparkline(sparkline) ⇒ Object



35
36
37
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 35

def add_sparkline(sparkline)
  @sparklines << sparkline
end

#add_table(table) ⇒ Object



31
32
33
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 31

def add_table(table)
  @tables << table
end


47
48
49
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 47

def reset_footer_images
  @footer_images
end

#reset_header_imagesObject



43
44
45
# File 'lib/write_xlsx/worksheet/asset_manager.rb', line 43

def reset_header_images
  @header_images
end