Class: Twb::Action
Constant Summary collapse
- @@hasher =
Notes Sources: <source>
type="datasource" <source datasource="Sample - Superstore - English (Extract)" type="datasource"> <exclude-sheets - use to exclude these from the Workbook's sheets - haven't seen an example of named sheet for datasoure - can only target a single worksheet, by observation type="sheet" Worksheet <source type="sheet" worksheet="Sheet 3"/> - use the worksheet attribute - can only target a single worksheet, by observation Dashboard <source dashboard="Dashboard 1" type="sheet" worksheet="Sheet 5"/> - dashboard attribute is present - use the worksheet attribute, if available <source dashboard="Dashboard 2" type="sheet"/> NO <exclude-sheets - source is all of the dashboard's sheets
Digest::SHA256.new
Instance Attribute Summary collapse
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#cmdExclude ⇒ Object
readonly
Returns the value of attribute cmdExclude.
-
#cmdSpecFields ⇒ Object
readonly
Returns the value of attribute cmdSpecFields.
-
#cmdTarget ⇒ Object
readonly
Returns the value of attribute cmdTarget.
-
#linkExpression ⇒ Object
readonly
Returns the value of attribute linkExpression.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#sourceDash ⇒ Object
readonly
Returns the value of attribute sourceDash.
-
#sourceSheet ⇒ Object
readonly
Returns the value of attribute sourceSheet.
-
#sourceType ⇒ Object
readonly
Returns the value of attribute sourceType.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#uiname ⇒ Object
readonly
Returns the value of attribute uiname.
-
#workbook ⇒ Object
readonly
Returns the value of attribute workbook.
Attributes inherited from TabClass
#properties, #ttlogfile, #ttlogfilename, #uuid
Instance Method Summary collapse
- #cmdParam(param) ⇒ Object
- #id ⇒ Object
-
#initialize(actionNode, workbookNode) ⇒ Action
constructor
A new instance of Action.
- #linkExpr ⇒ Object
- #process ⇒ Object
- #setType ⇒ Object
- #typeConv(rawType) ⇒ Object
Methods inherited from TabClass
#docFile, #emit, #setDocFileName
Constructor Details
#initialize(actionNode, workbookNode) ⇒ Action
Returns a new instance of Action.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/twb/action.rb', line 52 def initialize actionNode, workbookNode @workbook = workbookNode @node = actionNode # -- @name = @node.attr('name') @caption = @node.attr('caption') @uiname = @caption.nil? ? @name : @caption # -- @type = setType # -- @cmdTarget = cmdParam 'target' @cmdExclude = cmdParam 'exclude' @cmdSpecFields = cmdParam 'special-fields' # -- @linkExpression = linkExpr process return self end |
Instance Attribute Details
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
46 47 48 |
# File 'lib/twb/action.rb', line 46 def @caption end |
#cmdExclude ⇒ Object (readonly)
Returns the value of attribute cmdExclude.
49 50 51 |
# File 'lib/twb/action.rb', line 49 def cmdExclude @cmdExclude end |
#cmdSpecFields ⇒ Object (readonly)
Returns the value of attribute cmdSpecFields.
49 50 51 |
# File 'lib/twb/action.rb', line 49 def cmdSpecFields @cmdSpecFields end |
#cmdTarget ⇒ Object (readonly)
Returns the value of attribute cmdTarget.
49 50 51 |
# File 'lib/twb/action.rb', line 49 def cmdTarget @cmdTarget end |
#linkExpression ⇒ Object (readonly)
Returns the value of attribute linkExpression.
50 51 52 |
# File 'lib/twb/action.rb', line 50 def linkExpression @linkExpression end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
46 47 48 |
# File 'lib/twb/action.rb', line 46 def name @name end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
45 46 47 |
# File 'lib/twb/action.rb', line 45 def node @node end |
#sourceDash ⇒ Object (readonly)
Returns the value of attribute sourceDash.
48 49 50 |
# File 'lib/twb/action.rb', line 48 def sourceDash @sourceDash end |
#sourceSheet ⇒ Object (readonly)
Returns the value of attribute sourceSheet.
48 49 50 |
# File 'lib/twb/action.rb', line 48 def sourceSheet @sourceSheet end |
#sourceType ⇒ Object (readonly)
Returns the value of attribute sourceType.
48 49 50 |
# File 'lib/twb/action.rb', line 48 def sourceType @sourceType end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
47 48 49 |
# File 'lib/twb/action.rb', line 47 def type @type end |
#uiname ⇒ Object (readonly)
Returns the value of attribute uiname.
46 47 48 |
# File 'lib/twb/action.rb', line 46 def uiname @uiname end |
#workbook ⇒ Object (readonly)
Returns the value of attribute workbook.
45 46 47 |
# File 'lib/twb/action.rb', line 45 def workbook @workbook end |
Instance Method Details
#cmdParam(param) ⇒ Object
99 100 101 102 103 104 |
# File 'lib/twb/action.rb', line 99 def cmdParam param n = @node.at_xpath("./command/param[@name='#{param}']") return nil if n.nil? v = n.attribute('value') v.nil? ? nil : v.text end |
#id ⇒ Object
71 72 73 |
# File 'lib/twb/action.rb', line 71 def id @id ||= @id = @name.hash end |
#linkExpr ⇒ Object
94 95 96 97 |
# File 'lib/twb/action.rb', line 94 def linkExpr attr = @node.at_xpath('./link/@expression') attr.nil? ? nil : attr.text end |
#process ⇒ Object
75 76 77 |
# File 'lib/twb/action.rb', line 75 def process end |
#setType ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/twb/action.rb', line 79 def setType linkNode = @node.at_xpath('./link') return :link unless linkNode.nil? command = @node.at_xpath('./command/@command') return :notset if command.nil? type = case command.text when 'tsc:brush' :highlight when 'tsc:tsl-filter' :filter else command.text end end |
#typeConv(rawType) ⇒ Object
120 121 |
# File 'lib/twb/action.rb', line 120 def typeConv rawType end |