mdc/lib/domain/toc.rb
## Add an entry on the second level
# @param [String] parent_id id of the parent entry
# @param [String] id id of the entry
# @param [String] name name of the entry
Add an entry on the second level
Add an entry on the second level
def add_sub_entry(parent_id, id, name)
      parent = find_entry_by_id(parent_id, @entries)
      raise Exception, "Parent must exist #{parent_id}" if parent.nil?
      parent.add(id, name)
    end
def add_sub_entry ( parent_id , id , name ) parent = find_entry_by_id ( parent_id , @entries ) raise Exception , "Parent must exist #{parent_id}" if parent . nil? parent . add ( id , name ) end
Add an entry on the second level
Add an entry on the second level
parent_id
<not_specific>
id
<not_specific>
name
<not_specific>
<not_specific>
name name of the entry
name name of the entry