|
|
|
@ -9,11 +9,11 @@ module Spike |
|
|
|
section.subsections.each do |subsection| |
|
|
|
section.subsections.each do |subsection| |
|
|
|
subsection.pages.each do |page| |
|
|
|
subsection.pages.each do |page| |
|
|
|
page.questions.each do |question| |
|
|
|
page.questions.each do |question| |
|
|
|
create_question(question) |
|
|
|
# create_question(question) |
|
|
|
end |
|
|
|
end |
|
|
|
create_page(page) |
|
|
|
# create_page(page) |
|
|
|
end |
|
|
|
end |
|
|
|
create_subsection(subsection) |
|
|
|
# create_subsection(subsection) |
|
|
|
end |
|
|
|
end |
|
|
|
create_section(section) |
|
|
|
create_section(section) |
|
|
|
end |
|
|
|
end |
|
|
|
@ -41,14 +41,15 @@ module Spike |
|
|
|
out_file.puts("class Form::Lettings::Subsections::#{subsection.id.camelize} < ::Form::Subsection |
|
|
|
out_file.puts("class Form::Lettings::Subsections::#{subsection.id.camelize} < ::Form::Subsection |
|
|
|
def initialize(id, hsh, section) |
|
|
|
def initialize(id, hsh, section) |
|
|
|
super |
|
|
|
super |
|
|
|
@id = \"#{subsection.id}\" |
|
|
|
@id = \"#{subsection.id}\"") |
|
|
|
@label = \"#{subsection.label}\" |
|
|
|
out_file.puts(" @label = \"#{subsection.label}\"") if subsection.label |
|
|
|
@depends_on = #{subsection.depends_on} |
|
|
|
out_file.puts(" @depends_on = #{subsection.depends_on}") if subsection.depends_on |
|
|
|
end |
|
|
|
out_file.puts(" end |
|
|
|
|
|
|
|
|
|
|
|
def pages |
|
|
|
def pages |
|
|
|
@pages ||= #{pages_array}.compact |
|
|
|
@pages ||= #{pages_array}.compact |
|
|
|
end") |
|
|
|
end |
|
|
|
|
|
|
|
end") |
|
|
|
out_file.close |
|
|
|
out_file.close |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|