Sha256: cd15a587bce4e73ddc08da687bcaef51442cef2025fa7f2999e41320fbd3a6bd

Contents?: true

Size: 242 Bytes

Versions: 1

Compression:

Stored size: 242 Bytes

Contents

module ActiveRecordSurvey
	# Boolean answers can have values 0|1
	class Node::Answer::Boolean < Node::Answer
		# Only boolean values
		def validate_instance_node(instance_node)
			!instance_node.value.to_s.match(/^[0|1]$/).nil?
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_record_survey-0.1.0 lib/active_record_survey/node/answer/boolean.rb