Sha256: 085b8e36beb8398a1fea7352c2c03da90c2bf2954cdccc96e48deaa4b9c8f02f
Contents?: true
Size: 1.22 KB
Versions: 34
Compression:
Stored size: 1.22 KB
Contents
module GroupDocs class Questionnaire::Page < Api::Entity # @attr [Integer] number attr_accessor :number # @attr [String] title attr_accessor :title # @attr [Array<GroupDocs::Questionnaire::Question>] questions attr_accessor :questions # # Converts each question to GroupDocs::Questionnaire::Question object. # # @param [Array<GroupDocs::Questionnaire::Question, Hash>] questions # def questions=(questions) if questions @questions = questions.map do |question| if question.is_a?(GroupDocs::Questionnaire::Question) question else Questionnaire::Question.new(question) end end end end # # Adds question to page. # # @param [GroupDocs::Questionnaire::Question] question # @raise [ArgumentError] if question is not GroupDocs::Questionnaire::Question object # def add_question(question) question.is_a?(GroupDocs::Questionnaire::Question) or raise ArgumentError, "Question should be GroupDocs::Questionnaire::Question object, received: #{question.inspect}" @questions ||= Array.new @questions << question end end # Questionnaire::Page end # GroupDocs
Version data entries
34 entries across 34 versions & 1 rubygems