Class: Twb::Worksheet

Inherits:
Object
  • Object
show all
Includes:
TabTool
Defined in:
lib/twb/worksheet.rb

Constant Summary collapse

@@hasher =
Digest::SHA256.new

Instance Attribute Summary collapse

Attributes included from TabTool

#alerts, #docDir, #docfiles, #funcdoc, #licensed, #logfilename, #logger, #loglevel, #metrics, #properties, #ttdocdir, #type, #uuid

Instance Method Summary collapse

Methods included from TabTool

#addDocFile, #alert, #closeDocFiles, #config, #docFile, #docFileMaxNameLen, #docfilesdoc, #docfilesdocto_s, #emit, #emitCSV, #finis, #hasConfig, #init, #initCSV, #initDocDir, #initLogger, #license=, #licensed?, #loadConfig

Constructor Details

#initialize(sheetNode, twb) ⇒ Worksheet

Returns a new instance of Worksheet.


36
37
38
39
40
41
42
43
44
# File 'lib/twb/worksheet.rb', line 36

def initialize sheetNode, twb
  @twb  = twb
  @node = sheetNode
  @name = @node['name']
  emit "########################## Worksheet initialize name: #{@name}"
  loadDataSources
  loadFields
  return self
end

Instance Attribute Details

#colFieldsObject (readonly)

Returns the value of attribute colFields


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

def colFields
  @colFields
end

#datasourceFieldsObject (readonly)

Returns the value of attribute datasourceFields


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

def datasourceFields
  @datasourceFields
end

#datasourcenamesObject (readonly)

Returns the value of attribute datasourcenames


29
30
31
# File 'lib/twb/worksheet.rb', line 29

def datasourcenames
  @datasourcenames
end

#datasourcesObject (readonly)

Returns the value of attribute datasources


29
30
31
# File 'lib/twb/worksheet.rb', line 29

def datasources
  @datasources
end

#encodedFieldsObject (readonly)

Returns the value of attribute encodedFields


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

def encodedFields
  @encodedFields
end

#fieldsObject (readonly)

Returns the value of attribute fields


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

def fields
  @fields
end

#filtersObject (readonly)

Returns the value of attribute filters


32
33
34
# File 'lib/twb/worksheet.rb', line 32

def filters
  @filters
end

#hiddenObject

Returns the value of attribute hidden


34
35
36
# File 'lib/twb/worksheet.rb', line 34

def hidden
  @hidden
end

#nameObject (readonly)

Returns the value of attribute name


29
30
31
# File 'lib/twb/worksheet.rb', line 29

def name
  @name
end

#nodeObject (readonly)

Returns the value of attribute node


29
30
31
# File 'lib/twb/worksheet.rb', line 29

def node
  @node
end

#pageFieldsObject (readonly)

Returns the value of attribute pageFields


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

def pageFields
  @pageFields
end

#paneFieldsObject (readonly)

Returns the value of attribute paneFields


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

def paneFields
  @paneFields
end

#panesCountObject (readonly)

Returns the value of attribute panesCount


30
31
32
# File 'lib/twb/worksheet.rb', line 30

def panesCount
  @panesCount
end

#rowFieldsObject (readonly)

Returns the value of attribute rowFields


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

def rowFields
  @rowFields
end

#slicesFieldsObject (readonly)

Returns the value of attribute slicesFields


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

def slicesFields
  @slicesFields
end

#tooltipObject (readonly)

Returns the value of attribute tooltip


33
34
35
# File 'lib/twb/worksheet.rb', line 33

def tooltip
  @tooltip
end

#visibleObject

def hidden

@hidden ||= resolveHidden

end


87
88
89
# File 'lib/twb/worksheet.rb', line 87

def visible
  @visible
end

Instance Method Details

#addDSFields(fields, usage) ⇒ Object


91
92
93
94
# File 'lib/twb/worksheet.rb', line 91

def addDSFields fields, usage
  fields.each do  
  end
end

#datasource(name) ⇒ Object


58
59
60
# File 'lib/twb/worksheet.rb', line 58

def datasource name
  @datasources[name]
end

#idObject


46
47
48
# File 'lib/twb/worksheet.rb', line 46

def id
    @id ||= @name.hash
end

#workbookObject


50
51
52
# File 'lib/twb/worksheet.rb', line 50

def workbook
  @workbook ||= @node.at_xpath('/').root
end