Class: Writexlsx::Worksheet::PrintStyle

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

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePrintStyle

:nodoc:



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/write_xlsx/worksheet.rb', line 311

def initialize # :nodoc:
  @margin_left = 0.7
  @margin_right = 0.7
  @margin_top = 0.75
  @margin_bottom = 0.75
  @margin_header = 0.3
  @margin_footer = 0.3
  @repeat_rows   = ''
  @repeat_cols   = ''
  @print_area    = ''
  @hbreaks = []
  @vbreaks = []
  @scale = 100
  @fit_page = false
  @fit_width  = nil
  @fit_height = nil
  @page_setup_changed = false
  @across = false
  @orientation = true
end

Instance Attribute Details

#acrossObject

:nodoc:



308
309
310
# File 'lib/write_xlsx/worksheet.rb', line 308

def across
  @across
end

#fit_heightObject

:nodoc:



307
308
309
# File 'lib/write_xlsx/worksheet.rb', line 307

def fit_height
  @fit_height
end

#fit_pageObject

:nodoc:



307
308
309
# File 'lib/write_xlsx/worksheet.rb', line 307

def fit_page
  @fit_page
end

#fit_widthObject

:nodoc:



307
308
309
# File 'lib/write_xlsx/worksheet.rb', line 307

def fit_width
  @fit_width
end

#hbreaksObject

:nodoc:



306
307
308
# File 'lib/write_xlsx/worksheet.rb', line 306

def hbreaks
  @hbreaks
end

#margin_bottomObject

:nodoc:



303
304
305
# File 'lib/write_xlsx/worksheet.rb', line 303

def margin_bottom
  @margin_bottom
end

:nodoc:



304
305
306
# File 'lib/write_xlsx/worksheet.rb', line 304

def margin_footer
  @margin_footer
end

#margin_headerObject

:nodoc:



304
305
306
# File 'lib/write_xlsx/worksheet.rb', line 304

def margin_header
  @margin_header
end

#margin_leftObject

:nodoc:



303
304
305
# File 'lib/write_xlsx/worksheet.rb', line 303

def margin_left
  @margin_left
end

#margin_rightObject

:nodoc:



303
304
305
# File 'lib/write_xlsx/worksheet.rb', line 303

def margin_right
  @margin_right
end

#margin_topObject

:nodoc:



303
304
305
# File 'lib/write_xlsx/worksheet.rb', line 303

def margin_top
  @margin_top
end

#orientationObject

:nodoc:



309
310
311
# File 'lib/write_xlsx/worksheet.rb', line 309

def orientation
  @orientation
end

#page_setup_changedObject

:nodoc:



307
308
309
# File 'lib/write_xlsx/worksheet.rb', line 307

def page_setup_changed
  @page_setup_changed
end

:nodoc:



305
306
307
# File 'lib/write_xlsx/worksheet.rb', line 305

def print_area
  @print_area
end

#repeat_colsObject

:nodoc:



305
306
307
# File 'lib/write_xlsx/worksheet.rb', line 305

def repeat_cols
  @repeat_cols
end

#repeat_rowsObject

:nodoc:



305
306
307
# File 'lib/write_xlsx/worksheet.rb', line 305

def repeat_rows
  @repeat_rows
end

#scaleObject

:nodoc:



306
307
308
# File 'lib/write_xlsx/worksheet.rb', line 306

def scale
  @scale
end

#vbreaksObject

:nodoc:



306
307
308
# File 'lib/write_xlsx/worksheet.rb', line 306

def vbreaks
  @vbreaks
end

Instance Method Details

#attributesObject

:nodoc:



332
333
334
335
336
337
338
339
340
341
# File 'lib/write_xlsx/worksheet.rb', line 332

def attributes    # :nodoc:
  [
   'left',   @margin_left,
   'right',  @margin_right,
   'top',    @margin_top,
   'bottom', @margin_bottom,
   'header', @margin_header,
   'footer', @margin_footer
  ]
end

#orientation?Boolean

Returns:

  • (Boolean)


343
344
345
# File 'lib/write_xlsx/worksheet.rb', line 343

def orientation?
  !!@orientation
end