Class: Twb::Field
Instance Attribute Summary collapse
-
#aggregation ⇒ Object
readonly
Returns the value of attribute aggregation.
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#datatype ⇒ Object
readonly
Returns the value of attribute datatype.
-
#hidden ⇒ Object
readonly
Returns the value of attribute hidden.
-
#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.
Attributes inherited from TabClass
#properties, #ttlogfile, #ttlogfilename, #uuid
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(fieldNode) ⇒ Field
constructor
A new instance of Field.
Methods inherited from TabClass
#docFile, #emit, #setDocFileName
Constructor Details
#initialize(fieldNode) ⇒ Field
Returns a new instance of Field.
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# 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 |
Instance Attribute Details
#aggregation ⇒ Object (readonly)
Returns the value of attribute aggregation.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def aggregation @aggregation end |
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def @caption end |
#datatype ⇒ Object (readonly)
Returns the value of attribute datatype.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def datatype @datatype end |
#hidden ⇒ Object (readonly)
Returns the value of attribute hidden.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def hidden @hidden end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def name @name end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def node @node end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def role @role end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def type @type end |
#uiname ⇒ Object (readonly)
Returns the value of attribute uiname.
22 23 24 |
# File 'lib/twb/field.rb', line 22 def uiname @uiname end |
Instance Method Details
#id ⇒ Object
38 39 40 |
# File 'lib/twb/field.rb', line 38 def id @id ||= @id = @name.hash end |