lib/amee-data-abstraction/input.rb in amee-data-abstraction-2.1.1 vs lib/amee-data-abstraction/input.rb in amee-data-abstraction-2.2.0
- old
+ new
@@ -156,9 +156,19 @@
#
def compulsory?(usage=nil)
!optional?(usage)
end
+ # Manually set the term as optional
+ def optional!
+ @optional=true
+ end
+
+ # Manually set the term as compuslory
+ def compulsory!
+ @optional=false
+ end
+
# Check that the value of <tt>self</tt> is valid. If invalid, and is defined
# as part of a calculation, add the invalidity message to the parent
# calculation's error list. Otherwise, raise a <i>ChoiceValidation</i>
# exception.
#
\ No newline at end of file