Class: Twb::WorksheetField
- Inherits:
-
Object
- Object
- Twb::WorksheetField
- Defined in:
- lib/twb/worksheet.rb
Instance Attribute Summary collapse
-
#caption ⇒ Object
readonly
–.
-
#datasource ⇒ Object
readonly
–.
-
#name ⇒ Object
readonly
–.
-
#node ⇒ Object
readonly
–.
-
#uiname ⇒ Object
readonly
–.
Instance Method Summary collapse
-
#initialize(node, dsName) ⇒ WorksheetField
constructor
–.
-
#to_s ⇒ Object
–.
Constructor Details
#initialize(node, dsName) ⇒ WorksheetField
–
261 262 263 264 265 266 267 |
# File 'lib/twb/worksheet.rb', line 261 def initialize node, dsName @node = node @name = node.attr('name').gsub(/^\[/,'').gsub(/\]$/,'') @caption = node.attr('caption').nil? ? nil : node.attr('caption').gsub(/^\[/,'').gsub(/\]$/,'') @uiname = if @caption.nil? || @caption == '' then @name else @caption end @datasource = dsName end |
Instance Attribute Details
#caption ⇒ Object (readonly)
–
259 260 261 |
# File 'lib/twb/worksheet.rb', line 259 def @caption end |
#datasource ⇒ Object (readonly)
–
259 260 261 |
# File 'lib/twb/worksheet.rb', line 259 def datasource @datasource end |
#name ⇒ Object (readonly)
–
259 260 261 |
# File 'lib/twb/worksheet.rb', line 259 def name @name end |
#node ⇒ Object (readonly)
–
259 260 261 |
# File 'lib/twb/worksheet.rb', line 259 def node @node end |
#uiname ⇒ Object (readonly)
–
259 260 261 |
# File 'lib/twb/worksheet.rb', line 259 def uiname @uiname end |
Instance Method Details
#to_s ⇒ Object
–
269 270 271 |
# File 'lib/twb/worksheet.rb', line 269 def to_s "name:#{@name}|caption:#{@caption}|uiname:#{@uiname}||ds:#{datasource}" end |