Class: Decisive::XLSWithWorksheetsContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/decisive/template_handler.rb

Defined Under Namespace

Classes: Worksheet

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ XLSWithWorksheetsContext

Returns a new instance of XLSWithWorksheetsContext.



78
79
80
81
# File 'lib/decisive/template_handler.rb', line 78

def initialize *args, &block
  super
  instance_eval &block
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



75
76
77
# File 'lib/decisive/template_handler.rb', line 75

def filename
  @filename
end

#worksheetsObject

Returns the value of attribute worksheets

Returns:

  • (Object)

    the current value of worksheets



75
76
77
# File 'lib/decisive/template_handler.rb', line 75

def worksheets
  @worksheets
end

Instance Method Details

#csv?Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/decisive/template_handler.rb', line 87

def csv?
  false
end

#to_xlsObject



83
84
85
# File 'lib/decisive/template_handler.rb', line 83

def to_xls
  to_string(render(Spreadsheet::Workbook.new))
end