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:



264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/write_xlsx/worksheet.rb', line 264

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:



261
262
263
# File 'lib/write_xlsx/worksheet.rb', line 261

def across
  @across
end

#fit_heightObject

:nodoc:



260
261
262
# File 'lib/write_xlsx/worksheet.rb', line 260

def fit_height
  @fit_height
end

#fit_pageObject

:nodoc:



260
261
262
# File 'lib/write_xlsx/worksheet.rb', line 260

def fit_page
  @fit_page
end

#fit_widthObject

:nodoc:



260
261
262
# File 'lib/write_xlsx/worksheet.rb', line 260

def fit_width
  @fit_width
end

#hbreaksObject

:nodoc:



259
260
261
# File 'lib/write_xlsx/worksheet.rb', line 259

def hbreaks
  @hbreaks
end

#margin_bottomObject

:nodoc:



256
257
258
# File 'lib/write_xlsx/worksheet.rb', line 256

def margin_bottom
  @margin_bottom
end

:nodoc:



257
258
259
# File 'lib/write_xlsx/worksheet.rb', line 257

def margin_footer
  @margin_footer
end

#margin_headerObject

:nodoc:



257
258
259
# File 'lib/write_xlsx/worksheet.rb', line 257

def margin_header
  @margin_header
end

#margin_leftObject

:nodoc:



256
257
258
# File 'lib/write_xlsx/worksheet.rb', line 256

def margin_left
  @margin_left
end

#margin_rightObject

:nodoc:



256
257
258
# File 'lib/write_xlsx/worksheet.rb', line 256

def margin_right
  @margin_right
end

#margin_topObject

:nodoc:



256
257
258
# File 'lib/write_xlsx/worksheet.rb', line 256

def margin_top
  @margin_top
end

#orientation=(value) ⇒ Object (writeonly)

Sets the attribute orientation

Parameters:

  • value

    the value to set the attribute orientation to.



262
263
264
# File 'lib/write_xlsx/worksheet.rb', line 262

def orientation=(value)
  @orientation = value
end

#page_setup_changedObject

:nodoc:



260
261
262
# File 'lib/write_xlsx/worksheet.rb', line 260

def page_setup_changed
  @page_setup_changed
end

:nodoc:



258
259
260
# File 'lib/write_xlsx/worksheet.rb', line 258

def print_area
  @print_area
end

#repeat_colsObject

:nodoc:



258
259
260
# File 'lib/write_xlsx/worksheet.rb', line 258

def repeat_cols
  @repeat_cols
end

#repeat_rowsObject

:nodoc:



258
259
260
# File 'lib/write_xlsx/worksheet.rb', line 258

def repeat_rows
  @repeat_rows
end

#scaleObject

:nodoc:



259
260
261
# File 'lib/write_xlsx/worksheet.rb', line 259

def scale
  @scale
end

#vbreaksObject

:nodoc:



259
260
261
# File 'lib/write_xlsx/worksheet.rb', line 259

def vbreaks
  @vbreaks
end

Instance Method Details

#attributesObject

:nodoc:



285
286
287
288
289
290
291
292
293
294
# File 'lib/write_xlsx/worksheet.rb', line 285

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)


296
297
298
# File 'lib/write_xlsx/worksheet.rb', line 296

def orientation?
  !!@orientation
end