Sha256: 68661e3bb0220cb2e3bca51452f6f36490c5712b4f52b42b20e54bab2c8e0df6
Contents?: true
Size: 1.23 KB
Versions: 19
Compression:
Stored size: 1.23 KB
Contents
module GroupDocs class Questionnaire::Page < GroupDocs::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
19 entries across 19 versions & 1 rubygems