module Hermod::Sanitisation

def sanitise_attribute(value)

Returns the sanitised value of the attribute ready for sending to HMRC.

value - the non-sanitised value

anything else gets turned into a String.
Private: alters attributes so a true becomes "yes", a no isn't sent and
def sanitise_attribute(value)
  case value
  when true
    XmlSectionBuilder::YES
  when false
    nil # Attributes aren't included if they're false
  else
    value.to_s
  end
end