class Twb::Field

Attributes

aggregation[R]
caption[R]
datatype[R]
hidden[R]
name[R]
node[R]
role[R]
type[R]
uiname[R]

Public Class Methods

new(fieldNode) click to toggle source
# File lib/twb/field.rb, line 24
def initialize fieldNode
  @node        = fieldNode
  @name        = @node.attr('name')
  @datatype    = @node.attr('datatype')
  @role        = @node.attr('role')
  @type        = @node.attr('type')
  @hidden      = @node.attr('hidden')
  @caption     = @node.attr('caption')
  @aggregation = @node.attr('aggregation')
  @uiname      = if @caption.nil? || @caption == '' then @name.gsub(/^\[/,'').gsub(/\]$/,'') else @caption end
  #puts "\t\t - n:#{@name} \t  c:#{@caption} \t  n:#{@uiname}"
  return self
end

Public Instance Methods

id() click to toggle source
# File lib/twb/field.rb, line 38
def id
    @id ||= @id = @name.hash
end