lib/kriterion/section.rb in kriterion-0.0.1 vs lib/kriterion/section.rb in kriterion-0.1.0

- old
+ new

@@ -9,17 +9,30 @@ attr_accessor :description attr_accessor :items attr_accessor :sections def initialize(data) + super(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 + + def expandable? + true + end + + def expandable_keys + %i[ + sections + items + ] end def type :section end