lib/hermod/sanitisation.rb
# Private: alters attributes so a true becomes "yes", a no isn't sent and
# anything else gets turned into a String.
#
# value - the non-sanitised value
#
# Returns the sanitised value of the attribute ready for sending to HMRC.
alters attributes so a true becomes "yes", a no isn't sent and
anything else gets turned into a String.

the non-sanitised value

Returns the sanitised value of the attribute ready for sending to HMRC.
alters attributes so a true becomes " yes " a no isn ' t sent and anything else gets turned into a String . the non - sanitised value Returns the sanitised value of the attribute ready for sending to HMRC .
def sanitise_attribute(value)
      case value
      when true
        XmlSectionBuilder::YES
      when false
        nil 
      else
        value.to_s
      end
    end
def sanitise_attribute ( value ) case value when true XmlSectionBuilder :: YES when false nil else value . to_s end end
Private: alters attributes so a true becomes "yes", a no isn't sent and
anything else gets turned into a String.
Private : alters attributes so a true becomes " yes " a no isn ' t sent and anything else gets turned into a String .
# Attributes aren't included if they're false
value