Method: Twb::Parameter#initialize
- Defined in:
- lib/twb/parameter.rb
#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 = caption.nil? ? nameTech : caption @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 |