Sha256: daace546ac54262765f4062d2b08a2a169c1a60c39669022d839685748011c72

Contents?: true

Size: 510 Bytes

Versions: 1

Compression:

Stored size: 510 Bytes

Contents

module ActiveRecordSurvey
	class Node::Question < Node
		# Stop validating at the Question node
		def validate_parent_instance_node(instance_node, child_node)
			!self.node_validations.collect { |node_validation|
				node_validation.validate_instance_node(instance_node, self)
			}.include?(false)
		end

		# Build an answer off this node
		def build_answer(answer_node, survey)
			# Answers actually define how they're built off the parent node... yep
			answer_node.build_answer(self, survey)
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_record_survey-0.1.13 lib/active_record_survey/node/question.rb