If these are what I think they mean this line could be replaced with 
`code = lambda { |value| value ? NcsCode::YES : NcsCode::NO }`