module Origen::Generator::Compiler::DocHelpers::TestFlowHelpers

Helpers for the test flow documentation

Public Instance Methods

_bin_number(test) click to toggle source
# File lib/origen_doc_helpers/helpers.rb, line 171
def _bin_number(test)
  flow = test[:flow]
  flow[:bin] || flow[:hard_bin] || flow[:hardbin] || flow[:soft_bin] || flow[:softbin]
end
_sbin_number(test) click to toggle source
# File lib/origen_doc_helpers/helpers.rb, line 176
def _sbin_number(test)
  flow = test[:flow]
  flow[:soft_bin] || flow[:softbin]
end
_start_accordion(heading, options = {}) click to toggle source
# File lib/origen_doc_helpers/helpers.rb, line 181
          def _start_accordion(heading, options = {})
            options = {
              panel: :default
            }.merge(options)
            @_accordion_index ||= 0
            @_accordion_index += 1
            <<-END


<div class="panel panel-#{options[:panel]}">
<a href="#_" class="expand-collapse-switch btn btn-xs pull-right btn-default" state="0"><i class='fa fa-plus'></i></a>
<div class="panel-heading clickable" data-toggle="collapse" data-parent="#blah2" href="#collapseAccordion#{@_accordion_index}">
#{heading}
</div>
<div id="collapseAccordion#{@_accordion_index}" class="panel-collapse collapse">
<div class="panel-body" markdown="1">


            END
          end
_start_test_flow_table() click to toggle source
# File lib/origen_doc_helpers/helpers.rb, line 214
          def _start_test_flow_table
            if @_test_flow_table_open
              ''
            else
              @_test_flow_table_open = true
              <<-END
<table class="table table-condensed table-bordered flow-table">

<thead>
<tr>
<th class="col1">Test</th>
<th class="col2">Number</th>
<th class="col3">HBin</th>
<th class="col3">SBin</th>
<th class="col5">Attributes</th>
<th class="col6">Description</th>
</tr>
</thead>

<tbody>
              END
            end
          end
_stop_accordion() click to toggle source
# File lib/origen_doc_helpers/helpers.rb, line 202
          def _stop_accordion
            <<-END


</div>
</div>
</div>


            END
          end
_stop_test_flow_table() click to toggle source
# File lib/origen_doc_helpers/helpers.rb, line 238
          def _stop_test_flow_table
            if @_test_flow_table_open
              @_test_flow_table_open = false
              <<-END

</tbody>
</table>
              END
            else
              ''
            end
          end
_test_name(test) click to toggle source
# File lib/origen_doc_helpers/helpers.rb, line 162
def _test_name(test)
  test[:flow][:name] || test[:instance].first[:name]
end
_test_number(test) click to toggle source
# File lib/origen_doc_helpers/helpers.rb, line 166
def _test_number(test)
  flow = test[:flow]
  flow[:number] || flow[:test_number] || flow[:tnum]
end