Class: Origen::Specs::Note

Inherits:
Object show all
Defined in:
lib/origen/specs/note.rb

Overview

This class is used to store spec note information used to document IP

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, type, options = {}) ⇒ Note

Initialize the class



44
45
46
47
48
49
50
51
52
53
# File 'lib/origen/specs/note.rb', line 44

def initialize(id, type, options = {})
  @id = id
  @type = type
  @mode = options[:mode]
  @audience = options[:audience]
  @text = options[:text]
  @markup = options[:markup]
  @internal_comment = options[:internal_comment]
  @number = options[:number]
end

Instance Attribute Details

#audienceObject

Audience should be :ac or :dc, but this might have been phased out.

TODO:  Check to see if :type has been deprecated or is still needed


20
21
22
# File 'lib/origen/specs/note.rb', line 20

def audience
  @audience
end

#idObject

id is the id for the note. The goal for the id is to allow multiple specs to reference one note. spec.notes = [id1, id2, id3] spec1.notes = [id1, id4, id5]



8
9
10
# File 'lib/origen/specs/note.rb', line 8

def id
  @id
end

#internal_commentObject

Internal comment that could be used to know why the note was needed. Think of this as a breadcrumb to find out about more information on the note.



41
42
43
# File 'lib/origen/specs/note.rb', line 41

def internal_comment
  @internal_comment
end

#markupObject

Markup of the text field. Currently markup has been tested with

  • DITA

  • XML

  • HTML

Need to test the following markup

  • Markdown



37
38
39
# File 'lib/origen/specs/note.rb', line 37

def markup
  @markup
end

#modeObject

Mode will match the mode that this note belongs to.

TODO:  Check to see if :mode has been deprecated or is still needed


16
17
18
# File 'lib/origen/specs/note.rb', line 16

def mode
  @mode
end

#numberObject

Note Number. Optional. If not set, then DITA will make the number



26
27
28
# File 'lib/origen/specs/note.rb', line 26

def number
  @number
end

#textObject

Plain text of the note. No Mark-up allowed in this field.



23
24
25
# File 'lib/origen/specs/note.rb', line 23

def text
  @text
end

#typeObject

Type should be :ac or :dc, but this might have been phased out.

TODO:  Check to see if :type has been deprecated or is still needed


12
13
14
# File 'lib/origen/specs/note.rb', line 12

def type
  @type
end