Class: Kriterion::Section
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#items ⇒ Object
Returns the value of attribute items.
-
#name ⇒ Object
Returns the value of attribute name.
-
#sections ⇒ Object
Returns the value of attribute sections.
-
#standard ⇒ Object
Returns the value of attribute standard.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
- #compliance ⇒ Object
-
#initialize(data) ⇒ Section
constructor
A new instance of Section.
- #type ⇒ Object
Methods inherited from Object
Constructor Details
#initialize(data) ⇒ Section
Returns a new instance of Section.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/kriterion/section.rb', line 13 def initialize(data) @uuid = data['uuid'] || SecureRandom.uuid @name = data['name'] @standard = data['standard'] @description = data['description'] @items = data['items'] || [] @sections = data['sections'] || [] @parent_type = data['parent_type'] @parent_uuid = data['parent_uuid'] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/kriterion/section.rb', line 9 def description @description end |
#items ⇒ Object
Returns the value of attribute items.
10 11 12 |
# File 'lib/kriterion/section.rb', line 10 def items @items end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/kriterion/section.rb', line 7 def name @name end |
#sections ⇒ Object
Returns the value of attribute sections.
11 12 13 |
# File 'lib/kriterion/section.rb', line 11 def sections @sections end |
#standard ⇒ Object
Returns the value of attribute standard.
8 9 10 |
# File 'lib/kriterion/section.rb', line 8 def standard @standard end |
#uuid ⇒ Object
Returns the value of attribute uuid.
6 7 8 |
# File 'lib/kriterion/section.rb', line 6 def uuid @uuid end |