Class: Twb::TabClass
- Inherits:
-
Object
- Object
- Twb::TabClass
- Defined in:
- lib/twb/tabclass.rb
Direct Known Subclasses
Action, ColumnField, Dashboard, Field, FieldCalculation, LocalField, MetadataField, Storyboard, Window, Workbook
Constant Summary collapse
- @@ttlogfilename =
'TableauTools.ttlog'
- @@ttdocdir =
'./ttdoc'
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#ttlogfile ⇒ Object
Returns the value of attribute ttlogfile.
-
#ttlogfilename ⇒ Object
Returns the value of attribute ttlogfilename.
-
#type ⇒ Object
Returns the value of attribute type.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
- #docFile(name) ⇒ Object
- #emit(local = @localEmit, stuff) ⇒ Object
-
#initialize ⇒ TabClass
constructor
A new instance of TabClass.
- #setDocFileName ⇒ Object
Constructor Details
#initialize ⇒ TabClass
Returns a new instance of TabClass.
28 29 30 31 32 |
# File 'lib/twb/tabclass.rb', line 28 def initialize @ttlogfile = 'TableauTools.ttlog' @logger = Logger.new(@ttlogfile) @logger.level = Logger::DEBUG end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/twb/tabclass.rb', line 22 def id @id end |
#properties ⇒ Object
Returns the value of attribute properties.
22 23 24 |
# File 'lib/twb/tabclass.rb', line 22 def properties @properties end |
#ttlogfile ⇒ Object
Returns the value of attribute ttlogfile.
22 23 24 |
# File 'lib/twb/tabclass.rb', line 22 def ttlogfile @ttlogfile end |
#ttlogfilename ⇒ Object
Returns the value of attribute ttlogfilename.
22 23 24 |
# File 'lib/twb/tabclass.rb', line 22 def ttlogfilename @ttlogfilename end |
#type ⇒ Object
Returns the value of attribute type.
22 23 24 |
# File 'lib/twb/tabclass.rb', line 22 def type @type end |
#uuid ⇒ Object
Returns the value of attribute uuid.
22 23 24 |
# File 'lib/twb/tabclass.rb', line 22 def uuid @uuid end |
Instance Method Details
#docFile(name) ⇒ Object
50 51 52 |
# File 'lib/twb/tabclass.rb', line 50 def docFile name @ttdocdir.nil? ? name : "#{@@ttdocdir}/#{name}" end |
#emit(local = @localEmit, stuff) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/twb/tabclass.rb', line 54 def emit(local=@localEmit, stuff) # puts "\nstuff.class #{stuff.class} :: #{stuff}" if local if stuff.is_a? String then lines = stuff.split(/\n/) lines.each do |line| @logger.debug "#{@emitPrefix}#{line}" puts "#{@emitPrefix}#{line}" if local end else @logger.debug "#{@emitPrefix}#{stuff}" puts "#{@emitPrefix}#{stuff}" if local end end |
#setDocFileName ⇒ Object
46 47 48 |
# File 'lib/twb/tabclass.rb', line 46 def setDocFileName docFile @@ttlogfilename end |