Sha256: ba11ac606f0c66da2c653735885b4ba602a1fd1257196f03062e3bd721acfef5

Contents?: true

Size: 758 Bytes

Versions: 18

Compression:

Stored size: 758 Bytes

Contents

module SurveyParser
  class SurveySection < SurveyParser::Base
    # Context, Content, Display, Reference, Children, Placeholders
    attr_accessor :id, :parser, :survey_id
    attr_accessor :title, :description
    attr_accessor :reference_identifier, :data_export_identifier, :common_namespace, :common_identitier
    attr_accessor :display_order, :custom_class
    has_children :question_groups, :questions

    def parse_args(args)
      title = args[0]
      {:title => title, :data_export_identifier => Surveyor.to_normalized_string(title)}.merge(args[1] || {})
    end

    # Used to find questions for dependency linking
    def find_question_by_reference(ref_id)
      self.questions.detect{|q| q.reference_identifier == ref_id}
    end
  
  end
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
ccls-surveyor-1.0.0 script/surveyor/survey_section.rb
jakewendt-surveyor-0.11.3 script/surveyor/survey_section.rb
surveyor-0.14.2 script/surveyor/survey_section.rb
surveyor-0.14.1 script/surveyor/survey_section.rb
surveyor-0.14.0 script/surveyor/survey_section.rb
surveyor-0.13.0 script/surveyor/survey_section.rb
surveyor-0.12.1 script/surveyor/survey_section.rb
surveyor-0.11.0 script/surveyor/survey_section.rb
surveyor-0.10.0 script/surveyor/survey_section.rb
surveyor-0.9.10 script/surveyor/survey_section.rb
surveyor-0.9.9 script/surveyor/survey_section.rb
surveyor-0.9.8 script/surveyor/survey_section.rb
surveyor-0.9.7 script/surveyor/survey_section.rb
surveyor-0.9.6 script/surveyor/survey_section.rb
surveyor-0.9.5 script/surveyor/survey_section.rb
surveyor-0.9.4 script/surveyor/survey_section.rb
surveyor-0.9.3 script/surveyor/survey_section.rb
surveyor-0.9.2 script/surveyor/survey_section.rb