Class: Twb::Storyboard

Inherits:
TabClass show all
Defined in:
lib/twb/storyboard.rb

Constant Summary collapse

@@hasher =
Digest::SHA256.new

Instance Attribute Summary collapse

Attributes inherited from TabClass

#properties, #ttlogfile, #ttlogfilename, #type, #uuid

Instance Method Summary collapse

Methods inherited from TabClass

#docFile, #emit, #setDocFileName

Constructor Details

#initialize(node) ⇒ Storyboard

Returns a new instance of Storyboard.



27
28
29
30
31
32
# File 'lib/twb/storyboard.rb', line 27

def initialize node
  # puts "initialize Storyboard"
  @node    = node
  @name    = @node.attr('name')
  loadSheets
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



25
26
27
# File 'lib/twb/storyboard.rb', line 25

def name
  @name
end

#nodeObject (readonly)

Returns the value of attribute node.



25
26
27
# File 'lib/twb/storyboard.rb', line 25

def node
  @node
end

#sheetsObject (readonly)

Returns the value of attribute sheets.



25
26
27
# File 'lib/twb/storyboard.rb', line 25

def sheets
  @sheets
end

Instance Method Details

#idObject



34
35
36
# File 'lib/twb/storyboard.rb', line 34

def id
    @id ||= @id = @name.hash
end

#loadSheetsObject



38
39
40
41
42
43
44
# File 'lib/twb/storyboard.rb', line 38

def loadSheets
  @sheets = {}
  sheets = @node.xpath('.//story-point').to_a
  sheets.each do |node|
    @sheets[node.attr('captured-sheet')] = node.attr('captured-sheet')
  end
end

#worksheetsObject



46
47
48
# File 'lib/twb/storyboard.rb', line 46

def worksheets
  @sheets.values
end