Class: Twb::GroupField
- Inherits:
-
Object
- Object
- Twb::GroupField
- Includes:
- TabTool
- Defined in:
- lib/twb/groupfield.rb
Overview
module Data
Instance Attribute Summary collapse
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#uiname ⇒ Object
readonly
Returns the value of attribute uiname.
Attributes included from TabTool
#alerts, #docDir, #docfiles, #funcdoc, #licensed, #logfilename, #logger, #loglevel, #metrics, #ttdocdir, #type, #uuid
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(node) ⇒ GroupField
constructor
A new instance of GroupField.
- #loadProperties ⇒ Object
- #properties ⇒ 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(node) ⇒ GroupField
Returns a new instance of GroupField.
28 29 30 31 32 33 |
# File 'lib/twb/groupfield.rb', line 28 def initialize node @node = node @caption = @node['caption'] @name = @node['name'].gsub(/^\[|\]$/,'') @uiname = @caption.nil? ? @name : @caption end |
Instance Attribute Details
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
26 27 28 |
# File 'lib/twb/groupfield.rb', line 26 def @caption end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
26 27 28 |
# File 'lib/twb/groupfield.rb', line 26 def name @name end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
25 26 27 |
# File 'lib/twb/groupfield.rb', line 25 def node @node end |
#uiname ⇒ Object (readonly)
Returns the value of attribute uiname.
26 27 28 |
# File 'lib/twb/groupfield.rb', line 26 def uiname @uiname end |
Instance Method Details
#id ⇒ Object
35 36 37 |
# File 'lib/twb/groupfield.rb', line 35 def id @id ||= @id = @name.hash end |
#loadProperties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/twb/groupfield.rb', line 43 def loadProperties @properties= {} @node.attributes.each do |name,attr| @properties[name] = attr.value end @properties[:uiname] = @name return @properties end |
#properties ⇒ Object
39 40 41 |
# File 'lib/twb/groupfield.rb', line 39 def properties @properties ||= loadProperties end |