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.



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

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



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

def filename
  @filename
end

#worksheetsObject

Returns the value of attribute worksheets

Returns:

  • (Object)

    the current value of worksheets



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

def worksheets
  @worksheets
end

Instance Method Details

#csv?Boolean

Returns:

  • (Boolean)


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

def csv?
  false
end

#to_xlsObject



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

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