Class: Twb::Parameter
Instance Attribute Summary collapse
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#currentValue ⇒ Object
readonly
Returns the value of attribute currentValue.
-
#dataType ⇒ Object
readonly
Returns the value of attribute dataType.
-
#dataTypeCustom ⇒ Object
readonly
Returns the value of attribute dataTypeCustom.
-
#domainType ⇒ Object
readonly
Returns the value of attribute domainType.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#uiname ⇒ Object
readonly
Returns the value of attribute uiname.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Attributes included from TabTool
#alerts, #docDir, #docfiles, #funcdoc, #id, #licensed, #logfilename, #logger, #loglevel, #metrics, #properties, #ttdocdir, #uuid
Instance Method Summary collapse
-
#initialize(paramNode) ⇒ Parameter
constructor
A new instance of Parameter.
- #to_s ⇒ Object
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(paramNode) ⇒ Parameter
Returns a new instance of Parameter.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/twb/parameter.rb', line 31 def initialize(paramNode) @node = paramNode # -- @name = @node['name'].gsub(/^\[|\]$/,'') @caption = @node['caption'] @uiname = .nil? ? nameTech : @dataType = @node['datatype'] @format = @node['default-format'].nil? ? '<<default>>' : @node['default-format'] @dataTypeCustom = @node['datatype-customized'].nil? ? false : true @domainType = @node['param-domain-type'] @role = @node['role'] @type = @node['type'] @currentValue = paramNode.at_xpath('./calculation[@class="tableau"]')['formula'].gsub(/^[#"]|[#"]$/,'') @values = [] processNode end |
Instance Attribute Details
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
25 26 27 |
# File 'lib/twb/parameter.rb', line 25 def @caption end |
#currentValue ⇒ Object (readonly)
Returns the value of attribute currentValue.
28 29 30 |
# File 'lib/twb/parameter.rb', line 28 def currentValue @currentValue end |
#dataType ⇒ Object (readonly)
Returns the value of attribute dataType.
26 27 28 |
# File 'lib/twb/parameter.rb', line 26 def dataType @dataType end |
#dataTypeCustom ⇒ Object (readonly)
Returns the value of attribute dataTypeCustom.
26 27 28 |
# File 'lib/twb/parameter.rb', line 26 def dataTypeCustom @dataTypeCustom end |
#domainType ⇒ Object (readonly)
Returns the value of attribute domainType.
27 28 29 |
# File 'lib/twb/parameter.rb', line 27 def domainType @domainType end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
26 27 28 |
# File 'lib/twb/parameter.rb', line 26 def format @format end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
25 26 27 |
# File 'lib/twb/parameter.rb', line 25 def name @name end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
29 30 31 |
# File 'lib/twb/parameter.rb', line 29 def node @node end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
27 28 29 |
# File 'lib/twb/parameter.rb', line 27 def role @role end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
27 28 29 |
# File 'lib/twb/parameter.rb', line 27 def type @type end |
#uiname ⇒ Object (readonly)
Returns the value of attribute uiname.
25 26 27 |
# File 'lib/twb/parameter.rb', line 25 def uiname @uiname end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
28 29 30 |
# File 'lib/twb/parameter.rb', line 28 def values @values end |
Instance Method Details
#to_s ⇒ Object
48 49 50 |
# File 'lib/twb/parameter.rb', line 48 def to_s "%s => %s" % [uiname, values] end |