Class: Twb::LocalField

Inherits:
Object
  • Object
show all
Defined in:
lib/twb/localfield.rb

Overview

Assumption: A field can only be either a MetadataField or a LocalField, not both in a given Workbook data connection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fieldNode) ⇒ LocalField

Returns a new instance of LocalField.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/twb/localfield.rb', line 26

def initialize fieldNode
  puts "lf:: #{fieldNode}"
  @node        = fieldNode
  @type        = 'local'
  @datatype    = @node.attr('datatype')
  @name        = @node.attr('name')
  @ordinal     = @node.attr('ordinal')
  # @dbname      = @node.attr('name').gsub(/^\[/,'').gsub(/\]$/,'')
  # @datatype    = @node.attr('datatype')
  # @role        = @node.attr('role')
  # @type        = @node.attr('type')
  # @hidden      = @node.attr('hidden')
  # @caption     = @node.attr('caption')
  # @aggregation = @node.attr('aggregation')
  # @calculation = getCalculation
  # @comments    = getComments
  # @uiname      = if @caption.nil? || @caption == '' then @dbname else @caption end
  # return self
end

Instance Attribute Details

#datatypeObject (readonly)

Returns the value of attribute datatype.



24
25
26
# File 'lib/twb/localfield.rb', line 24

def datatype
  @datatype
end

#nameObject (readonly)

Returns the value of attribute name.



24
25
26
# File 'lib/twb/localfield.rb', line 24

def name
  @name
end

#nodeObject (readonly)

Returns the value of attribute node.



24
25
26
# File 'lib/twb/localfield.rb', line 24

def node
  @node
end

#ordinalObject (readonly)

Returns the value of attribute ordinal.



24
25
26
# File 'lib/twb/localfield.rb', line 24

def ordinal
  @ordinal
end

#typeObject (readonly)

Returns the value of attribute type.



24
25
26
# File 'lib/twb/localfield.rb', line 24

def type
  @type
end